Skip to content

Commit 12ef52c

Browse files
authored
Merge branch 'main' into daymon-migrate-tests-to-junit4
2 parents 1ec65f8 + d402ad0 commit 12ef52c

File tree

13 files changed

+207
-60
lines changed

13 files changed

+207
-60
lines changed

firebase-dataconnect/connectors/connectors.gradle.kts

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ dependencies {
7070

7171
testImplementation(project(":firebase-dataconnect:testutil"))
7272
testImplementation(libs.androidx.test.junit)
73+
testImplementation(libs.kotest.assertions)
74+
testImplementation(libs.kotest.property)
7375
testImplementation(libs.kotlin.coroutines.test)
7476
testImplementation(libs.mockk)
7577
testImplementation(libs.robolectric)
@@ -84,6 +86,7 @@ dependencies {
8486
androidTestImplementation(libs.kotest.assertions)
8587
androidTestImplementation(libs.kotest.property)
8688
androidTestImplementation(libs.kotlin.coroutines.test)
89+
androidTestImplementation(libs.testonly.three.ten.abp)
8790
androidTestImplementation(libs.truth)
8891
androidTestImplementation(libs.truth.liteproto.extension)
8992
androidTestImplementation(libs.turbine)
@@ -127,29 +130,77 @@ tasks.register<UpdateDataConnectExecutableVersionsTask>("updateJson") {
127130
)
128131
workDirectory.set(project.layout.buildDirectory.dir("updateJson"))
129132

130-
val singleVersion: String? = project.providers.gradleProperty("version").orNull
133+
val propertyNames =
134+
object {
135+
val version = "version"
136+
val versions = "versions"
137+
val updateMode = "updateMode"
138+
val defaultVersion = "defaultVersion"
139+
}
140+
141+
val singleVersion: String? = project.providers.gradleProperty(propertyNames.version).orNull
131142
val multipleVersions: List<String>? =
132-
project.providers.gradleProperty("versions").orNull?.split(',')
143+
project.providers.gradleProperty(propertyNames.versions).orNull?.split(',')
133144
versions.set(
134145
buildList {
135146
singleVersion?.let { add(it) }
136147
multipleVersions?.let { addAll(it) }
137-
if (isEmpty()) {
138-
throw Exception("bm6d5ezxzd 'version' or 'versions' property must be specified")
139-
}
140148
}
141149
)
142150

151+
doFirst {
152+
if (versions.get().isEmpty()) {
153+
logger.warn(
154+
"WARNING: no '${propertyNames.version}' or '${propertyNames.versions}' specified " +
155+
"for task '$name'; no versions will be added to ${jsonFile.get()}. " +
156+
"Try specifying something like '-P${propertyNames.version}=1.2.3' or " +
157+
"'-P${propertyNames.versions}=1.2.3,4.5.6' on the gradle command line " +
158+
"if you want to add versions (warning code bm6d5ezxzd)"
159+
)
160+
}
161+
}
162+
143163
updateMode.set(
144-
project.providers.gradleProperty("updateMode").map {
164+
project.providers.gradleProperty(propertyNames.updateMode).map {
145165
when (it) {
146166
"overwrite" -> UpdateDataConnectExecutableVersionsTask.UpdateMode.Overwrite
147167
"update" -> UpdateDataConnectExecutableVersionsTask.UpdateMode.Update
148168
else ->
149-
throw Exception("ahe4zadcjs 'updateMode' must be 'overwrite' or 'update', but got: $it")
169+
throw Exception(
170+
"Invalid '${propertyNames.updateMode}' specified for task '$name': $it. " +
171+
"Valid values are 'update' and 'overwrite'. " +
172+
"Try specifying '-P${propertyNames.updateMode}=update' or " +
173+
"'-P${propertyNames.updateMode}=overwrite' on the gradle command line. " +
174+
"(error code v2e3cfqbnf)"
175+
)
150176
}
151177
}
152178
)
153179

154-
defaultVersion.set(project.providers.gradleProperty("defaultVersion"))
180+
doFirst {
181+
if (!updateMode.isPresent) {
182+
logger.warn(
183+
"WARNING: no '${propertyNames.updateMode}' specified for task '$name'; " +
184+
"the default update mode of 'update' will be used when updating ${jsonFile.get()}. " +
185+
"Try specifying '-P${propertyNames.updateMode}=update' or " +
186+
"'-P${propertyNames.updateMode}=overwrite' on the gradle command line " +
187+
"if you want a different update mode, or just want to be explicit about " +
188+
"which update mode is in effect (warning code tjyscqmdne)"
189+
)
190+
}
191+
}
192+
193+
defaultVersion.set(project.providers.gradleProperty(propertyNames.defaultVersion))
194+
195+
doFirst {
196+
if (!defaultVersion.isPresent) {
197+
logger.warn(
198+
"WARNING: no '${propertyNames.defaultVersion}' specified for task '$name'; " +
199+
"the default version will not be updated in ${jsonFile.get()}. " +
200+
"Try specifying something like '-P${propertyNames.defaultVersion}=1.2.3' " +
201+
"on the gradle command line if you want to update the default version " +
202+
"(warning code vqrbrktx9f)"
203+
)
204+
}
205+
}
155206
}

firebase-dataconnect/firebase-dataconnect.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ dependencies {
100100
implementation("com.google.firebase:firebase-components:18.0.0")
101101

102102
compileOnly(libs.javax.annotation.jsr250)
103+
compileOnly(libs.kotlinx.datetime)
103104
implementation(libs.grpc.android)
104105
implementation(libs.grpc.kotlin.stub)
105106
implementation(libs.grpc.okhttp)
@@ -117,6 +118,7 @@ dependencies {
117118
testImplementation(libs.kotest.property)
118119
testImplementation(libs.kotest.property.arbs)
119120
testImplementation(libs.kotlin.coroutines.test)
121+
testImplementation(libs.kotlinx.datetime)
120122
testImplementation(libs.kotlinx.serialization.json)
121123
testImplementation(libs.mockk)
122124
testImplementation(libs.robolectric)
@@ -136,6 +138,7 @@ dependencies {
136138
androidTestImplementation(libs.kotest.property)
137139
androidTestImplementation(libs.kotest.property.arbs)
138140
androidTestImplementation(libs.kotlin.coroutines.test)
141+
androidTestImplementation(libs.kotlinx.datetime)
139142
androidTestImplementation(libs.mockk)
140143
androidTestImplementation(libs.mockk.android)
141144
androidTestImplementation(libs.truth)

firebase-dataconnect/gradleplugin/plugin/src/main/resources/com/google/firebase/dataconnect/gradle/plugin/DataConnectExecutableVersions.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,42 @@
216216
"os": "linux",
217217
"size": 25129112,
218218
"sha512DigestHex": "6ae87788e55d3c79dc8558fe899c06aed21237b2ab332593d05c02d6db98fc94c3e7861dbb58af1fbb69a0dfa639c005539fe3006d4f001af69b8532a7f175b0"
219+
},
220+
{
221+
"version": "1.5.1",
222+
"os": "windows",
223+
"size": 25720320,
224+
"sha512DigestHex": "c53e7225186fa16b890992705a1aca49e63d6b910f2150c6a64a6ce62d56f01781a2f24a93058595e8eba84cd9bc68aa076b6197c6dacd7e9c04f808efa32172"
225+
},
226+
{
227+
"version": "1.5.1",
228+
"os": "macos",
229+
"size": 25289472,
230+
"sha512DigestHex": "1922e64aecfb70db1bf73a8b45e8eca08f0ff5e0bc49ef8ef386cfe5b3d92b3a8e54f9f296f991bf9dabedb90cfb3dc89e2f0d058818444f8b1f5f44dcae7ec9"
231+
},
232+
{
233+
"version": "1.5.1",
234+
"os": "linux",
235+
"size": 25202840,
236+
"sha512DigestHex": "23fc6ee16d70af1c9cff71ebd5a8b4c171cb2992f27bf8defb267701fb6b7e650ccf6745ad17aac14f6b9208929bac4c4a25d0b0b42437c1f91c474d779e20c4"
237+
},
238+
{
239+
"version": "1.6.0",
240+
"os": "windows",
241+
"size": 25731072,
242+
"sha512DigestHex": "33f59b28649eae190e8b54e181efb5d0db675f4dbd104cbd635302b6db7ebcedb430f99106a5181ec328a02cacc79dbf2e73aec878e74c3eb17b2e554cc24d27"
243+
},
244+
{
245+
"version": "1.6.0",
246+
"os": "macos",
247+
"size": 25301760,
248+
"sha512DigestHex": "ac147e24eee3611b186dd89e7b2829d843544552708d7fbce54cf340fa87fa073ae0c32332659519c16eabd0bf5d3e4fa85311aed5e2a5b7de1ee770f50a329b"
249+
},
250+
{
251+
"version": "1.6.0",
252+
"os": "linux",
253+
"size": 25219224,
254+
"sha512DigestHex": "1ac47fee5ef0a06f2f4acb9d464da21d9df1e17df5768cd73fdb69c839048c30fd57d330881ef6e1c78b5cc37e3fe92378dac22aed0d3d0a8d0a1fa77a045f0d"
219255
}
220256
]
221257
}

firebase-dataconnect/testutil/testutil.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ dependencies {
5555
implementation("com.google.firebase:firebase-auth:22.3.1")
5656

5757
implementation(libs.androidx.test.junit)
58+
implementation(libs.kotest.assertions)
5859
implementation(libs.kotest.property)
5960
implementation(libs.kotlin.coroutines.test)
6061
implementation(libs.kotlinx.coroutines.core)
6162
implementation(libs.kotlinx.serialization.core)
6263
implementation(libs.mockk)
6364
implementation(libs.protobuf.java.lite)
6465
implementation(libs.robolectric)
66+
implementation(libs.testonly.three.ten.abp)
6567
implementation(libs.truth)
6668
}
6769

firebase-functions/firebase-functions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ dependencies {
112112
implementation(libs.playservices.basement)
113113
api(libs.playservices.tasks)
114114

115-
annotationProcessor(libs.autovalue)
115+
kapt(libs.autovalue)
116116
annotationProcessor(libs.dagger.compiler)
117117

118118
testImplementation(libs.androidx.test.core)

firebase-messaging/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Unreleased
2+
* [deprecated] Deprecated additional FCM upstream messaging methods. See the
3+
[FAQ](https://firebase.google.com/support/faq#fcm-23-deprecation) for more
4+
details.
25

36

47
# 24.0.3

firebase-messaging/src/main/java/com/google/firebase/messaging/FirebaseMessaging.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060

6161
/**
6262
* Top level <a href="https://firebase.google.com/docs/cloud-messaging/">Firebase Cloud
63-
* Messaging</a> singleton that provides methods for subscribing to topics and sending upstream
64-
* messages.
63+
* Messaging</a> singleton that provides methods for generating tokens and subscribing to topics.
6564
*
6665
* <p>In order to receive messages, declare an implementation of <br>
6766
* {@link FirebaseMessagingService} in the app manifest. To process messages, override base class
@@ -515,9 +514,9 @@ public Task<Void> unsubscribeFromTopic(@NonNull String topic) {
515514
* <p>When there is an active connection the message will be sent immediately, otherwise the
516515
* message will be queued up to the time to live (TTL) set in the message.
517516
*
518-
* @deprecated FCM upstream messaging is deprecated and will be decommissioned in June 2024. Learn
519-
* more in the <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about
520-
* FCM features deprecated in June 2023</a>.
517+
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
518+
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
519+
* deprecated in June 2023</a>.
521520
*/
522521
@Deprecated
523522
public void send(@NonNull RemoteMessage message) {

firebase-messaging/src/main/java/com/google/firebase/messaging/FirebaseMessagingService.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
* Base class for receiving messages from Firebase Cloud Messaging.
3636
*
3737
* <p>Extending this class is required to be able to handle downstream messages. It also provides
38-
* functionality to automatically display notifications, and has methods that are invoked to give
39-
* the status of upstream messages.
38+
* functionality to automatically display notifications.
4039
*
4140
* <p>Override base class methods to handle any events required by the application. All methods are
4241
* invoked on a background thread, and <em>may be called when the app is in the background or not
@@ -127,7 +126,12 @@ public void onDeletedMessages() {}
127126
* Called when an upstream message has been successfully sent to the GCM connection server.
128127
*
129128
* @param msgId of the upstream message sent using {@link FirebaseMessaging#send}.
129+
*
130+
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
131+
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
132+
* deprecated in June 2023</a>.
130133
*/
134+
@Deprecated
131135
@WorkerThread
132136
public void onMessageSent(@NonNull String msgId) {}
133137

@@ -136,7 +140,12 @@ public void onMessageSent(@NonNull String msgId) {}
136140
*
137141
* @param msgId of the upstream message sent using {@link FirebaseMessaging#send}.
138142
* @param exception description of the error, typically a {@link SendException}.
143+
*
144+
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
145+
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
146+
* deprecated in June 2023</a>.
139147
*/
148+
@Deprecated
140149
@WorkerThread
141150
public void onSendError(@NonNull String msgId, @NonNull Exception exception) {}
142151

firebase-messaging/src/main/java/com/google/firebase/messaging/RemoteMessage.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,10 @@
4040
/**
4141
* A remote Firebase Message.
4242
*
43-
* <p>Messages will be received via {@link
44-
* FirebaseMessagingService#onMessageReceived(RemoteMessage)} and can be sent via {@link
45-
* FirebaseMessaging#send(RemoteMessage)}.
43+
* <p>Messages will be received via {@link FirebaseMessagingService#onMessageReceived(RemoteMessage)}.
4644
*
4745
* <p>Messages may have a {@link Notification} instance if they are received while the application
4846
* is in the foreground, otherwise they will be automatically posted to the notification tray.
49-
*
50-
* <p>Use the {@link Builder} class for building message instances to send via {@link
51-
* FirebaseMessaging#send(RemoteMessage)}.
5247
*/
5348
@SafeParcelable.Reserved({1 /* version field removed by bot go/versionless-safeparcelable */})
5449
@SafeParcelable.Class(creator = "RemoteMessageCreator")
@@ -115,11 +110,11 @@ public String getFrom() {
115110
/**
116111
* Gets the message destination.
117112
*
118-
* <ul>
119-
* <li>For upstream messages, this will be of the form {@code [email protected]}.
120-
* <li>For downstream messages, this will be the Firebase installations ID (FID).
121-
* </ul>
113+
* @deprecated FCM upstream messaging is decommissioned. Learn more in the
114+
* <a href="https://firebase.google.com/support/faq#fcm-23-deprecation">FAQ about FCM features
115+
* deprecated in June 2023</a>.
122116
*/
117+
@Deprecated
123118
@Nullable
124119
public String getTo() {
125120
return bundle.getString(MessagePayloadKeys.TO);
@@ -373,13 +368,13 @@ public String getMessageType() {
373368
/** @hide */
374369
@Nullable
375370
public String getCollapseKey() {
376-
return bundle.getString(MessagePayloadKeys.MESSAGE_TYPE);
371+
return bundle.getString(MessagePayloadKeys.COLLAPSE_KEY);
377372
}
378373

379374
/** @hide */
380375
@IntRange(from = 0, to = 86400)
381376
public int getTtl() {
382-
return Integer.parseInt(bundle.getString(MessagePayloadKeys.MESSAGE_TYPE, "0"));
377+
return Integer.parseInt(bundle.getString(MessagePayloadKeys.TTL, "0"));
383378
}
384379

385380
/** @hide */

firebase-vertexai/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unreleased
22
* [fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409)
3-
3+
* [fixed] Clarified in the documentation that `Schema.integer` and `Schema.float` only provide hints to the model. (#6420)
44

55
# 16.0.1
66
* [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400)

0 commit comments

Comments
 (0)