Skip to content

Commit f0189b2

Browse files
authored
Merge branch 'main' into dconeybe/dataconnect/WarningFixesTargetSdkEtAl
2 parents 853d1f5 + ca9ec52 commit f0189b2

File tree

6 files changed

+22
-29
lines changed

6 files changed

+22
-29
lines changed

plugins/src/main/java/com/google/firebase/gradle/plugins/Changelog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ data class ReleaseContent(val subtext: String, val changes: List<Change>) {
264264
* ]
265265
* ```
266266
*/
267-
val CHANGE_REGEX = Regex("^\\* ([\\s\\S]+?)(?=^\\*|(?![\\s\\S]))", RegexOption.MULTILINE)
267+
val CHANGE_REGEX = "^[*-] ([\\s\\S]+?)(?=^[*-]|(?![\\s\\S]))".toRegex(RegexOption.MULTILINE)
268268

269269
/**
270270
* Regex for finding the subtext in a release.

plugins/src/main/java/com/google/firebase/gradle/plugins/MakeReleaseNotesTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ abstract class MakeReleaseNotesTask : DefaultTask() {
191191
*/
192192
private val LINK_REGEX =
193193
Regex(
194-
"(?:GitHub )?(?:\\[|\\()#(\\d+)(?:\\]|\\))(?:\\(.+?\\))?(?:\\{: \\.external\\})?",
194+
"(?:GitHub )?(?:\\[|\\()#(\\d+)(?:\\]|\\))(?:\\(.+?\\))?(?:\\{:\\s*\\.external\\})?",
195195
RegexOption.MULTILINE,
196196
)
197197
}

plugins/src/test/kotlin/com/google/firebase/gradle/plugins/MakeReleaseNotesTests.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
package com.google.firebase.gradle.plugins
1818

1919
import io.kotest.core.spec.style.FunSpec
20-
import io.kotest.matchers.collections.beEmpty
21-
import io.kotest.matchers.file.exist
22-
import io.kotest.matchers.should
20+
import io.kotest.matchers.file.shouldExist
21+
import io.kotest.matchers.shouldBe
2322
import java.io.File
2423
import org.gradle.testkit.runner.GradleRunner
2524
import org.junit.BeforeClass
@@ -39,9 +38,8 @@ class MakeReleaseNotesTests : FunSpec() {
3938
"firebase-storage/build/tmp/makeReleaseNotes/release_notes.md"
4039
)
4140

42-
releaseNoteFile should exist()
43-
44-
releaseNoteFile.readLines() diff expectedReleaseNoteFile.readLines() should beEmpty()
41+
releaseNoteFile.shouldExist()
42+
releaseNoteFile.readText() shouldBe expectedReleaseNoteFile.readText()
4543
}
4644

4745
private fun buildReleaseNotes() =

plugins/src/test/kotlin/com/google/firebase/gradle/plugins/MoveUnreleasedChangesTests.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import io.kotest.matchers.collections.shouldContainExactly
2222
import io.kotest.matchers.collections.shouldHaveAtLeastSize
2323
import io.kotest.matchers.collections.shouldHaveSize
2424
import io.kotest.matchers.shouldBe
25-
import io.kotest.matchers.string.shouldMatch
2625
import java.io.File
2726
import org.gradle.testkit.runner.GradleRunner
2827
import org.junit.BeforeClass
@@ -102,7 +101,7 @@ class MoveUnreleasedChangesTests : FunSpec() {
102101
val originalEntry = original.releases.first()
103102

104103
releasedEntry.content.changes shouldContainExactly originalEntry.content.changes
105-
releasedEntry.content.subtext shouldMatch originalEntry.content.subtext
104+
releasedEntry.content.subtext shouldBe originalEntry.content.subtext
106105
}
107106

108107
companion object {

plugins/src/test/resources/BasicProject/firebase-storage/CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Note: We did some super cool stuff here!
55
- [feature] Added support for disjunctions in queries (`OR` queries).
66

77
- [feature] Firebase now supports Kotlin coroutines. With this release, we added
8-
[`kotlinx-coroutines-play-services`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-play-services/){:
9-
.external} to `firebase-firestore-ktx` as a transitive dependency, which exposes the
8+
[`kotlinx-coroutines-play-services`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-play-services/){:.external} to `firebase-firestore-ktx` as a transitive dependency, which exposes the
109
`Task<T>.await()` suspend function to convert a
1110
[`Task`](https://developers.google.com/android/guides/tasks) into a Kotlin coroutine.
1211

@@ -15,7 +14,7 @@ Note: We did some super cool stuff here!
1514
- [removed] Removed some old stuff (#562)
1615

1716
- [feature] Added this thing we wanted
18-
[#444](//github.com/firebase/firebase-android-sdk/issues/number){: .external}
17+
[#444](//github.com/firebase/firebase-android-sdk/issues/number){:.external}
1918

2019
- [feature] Added
2120
[`Query.snapshots()`](/docs/reference/kotlin/com/google/firebase/firestore/ktx/package-summary#snapshots_1)
@@ -45,7 +44,7 @@ Note: We did some super cool stuff here!
4544
# 24.5.0
4645

4746
- [fixed] Fixed stack overflow caused by deeply nested server timestamps. (GitHub
48-
[#4702](//github.com/firebase/firebase-android-sdk/issues/4702){: .external})
47+
[#4702](//github.com/firebase/firebase-android-sdk/issues/4702){:.external})
4948

5049
## Kotlin
5150

plugins/src/test/resources/MakeReleaseNotes/release-notes.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,29 @@
22

33
Note: We did some super cool stuff here!
44

5-
- {{feature}} Added support for disjunctions in queries (`OR` queries).
5+
* {{feature}} Added support for disjunctions in queries (`OR` queries).
66

7-
- {{feature}} Firebase now supports Kotlin coroutines. With this release, we added
8-
[`kotlinx-coroutines-play-services`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-play-services/){:
9-
.external} to `firebase-firestore-ktx` as a transitive dependency, which exposes the
7+
* {{feature}} Firebase now supports Kotlin coroutines. With this release, we added
8+
[`kotlinx-coroutines-play-services`](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-play-services/){:.external} to `firebase-firestore-ktx` as a transitive dependency, which exposes the
109
`Task<T>.await()` suspend function to convert a
1110
[`Task`](https://developers.google.com/android/guides/tasks) into a Kotlin coroutine.
1211

13-
- {{fixed}} An issue on GitHub [#123](//github.com/firebase/firebase-android-sdk/issues/123){:
14-
.external}
12+
* {{fixed}} An issue on GitHub [#123](//github.com/firebase/firebase-android-sdk/issues/123){: .external}
1513

16-
- {{removed}} Removed some old stuff GitHub
17-
[#562](//github.com/firebase/firebase-android-sdk/issues/562){: .external}
14+
* {{removed}} Removed some old stuff GitHub [#562](//github.com/firebase/firebase-android-sdk/issues/562){: .external}
1815

19-
- {{feature}} Added this thing we wanted GitHub
20-
[#444](//github.com/firebase/firebase-android-sdk/issues/444){: .external}
16+
* {{feature}} Added this thing we wanted
17+
GitHub [#444](//github.com/firebase/firebase-android-sdk/issues/444){: .external}
2118

22-
- {{feature}} Added
19+
* {{feature}} Added
2320
[`Query.snapshots()`](/docs/reference/kotlin/com/google/firebase/firestore/ktx/package-summary#snapshots_1)
2421
and
2522
[`DocumentReference.snapshots()`](/docs/reference/kotlin/com/google/firebase/firestore/ktx/package-summary#snapshots)
2623
Kotlin Flows to listen for realtime updates.
2724

28-
- {{fixed}} Fixed an issue in `waitForPendingWrites()` that could lead to a `NullPointerException`.
25+
* {{fixed}} Fixed an issue in `waitForPendingWrites()` that could lead to a `NullPointerException`.
2926

30-
- {{feature}} Added
27+
* {{feature}} Added
3128
[`Query.whereNotIn()`](</docs/reference/android/com/google/firebase/firestore/Query#whereNotIn(java.lang.String,%20java.util.List<?%20extends%20java.lang.Object)>>)
3229
and
3330
[`Query.whereNotEqualTo()`](</docs/reference/android/com/google/firebase/firestore/Query#whereNotEqualTo(java.lang.String,%20java.lang.Object)>)
@@ -40,6 +37,6 @@ Note: We did some super cool stuff here!
4037

4138
Neither query operator finds documents where the specified field isn't present.
4239

43-
- {{unchanged}} Idk ig we did some stuff
40+
* {{unchanged}} Idk ig we did some stuff
4441

45-
- {{removed}} some stuff that we didn't really like got removed
42+
* {{removed}} some stuff that we didn't really like got removed

0 commit comments

Comments
 (0)