Skip to content

Commit 8608014

Browse files
authored
Merge branch 'main' into rl.agp.8.3.2
2 parents 1a17a3b + c00de5a commit 8608014

File tree

9 files changed

+38
-14
lines changed

9 files changed

+38
-14
lines changed

firebase-components/firebase-dynamic-module-support/firebase-dynamic-module-support.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ android {
4949
}
5050

5151
dependencies {
52-
implementation("com.google.android.play:feature-delivery:2.0.0")
52+
implementation(libs.feature.delivery)
5353
implementation(libs.kotlin.stdlib.jdk8)
54-
api("com.google.firebase:firebase-common:21.0.0")
55-
api("com.google.firebase:firebase-components:18.0.0")
54+
api(libs.firebase.common)
55+
api(libs.firebase.components)
5656
}

firebase-crashlytics/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [fixed] Execute failure listener outside the main thread [#6535]
33

44
# 19.2.1
55
* [changed] Updated protobuf dependency to `3.25.5` to fix
@@ -634,4 +634,3 @@ The following release notes describe changes in the new SDK.
634634
from your `AndroidManifest.xml` file.
635635
* [removed] The `fabric.properties` and `crashlytics.properties` files are no
636636
longer supported. Remove them from your app.
637-

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/CrashlyticsRegistrar.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.google.firebase.analytics.connector.AnalyticsConnector;
1919
import com.google.firebase.annotations.concurrent.Background;
2020
import com.google.firebase.annotations.concurrent.Blocking;
21+
import com.google.firebase.annotations.concurrent.Lightweight;
2122
import com.google.firebase.components.Component;
2223
import com.google.firebase.components.ComponentContainer;
2324
import com.google.firebase.components.ComponentRegistrar;
@@ -42,6 +43,8 @@ public class CrashlyticsRegistrar implements ComponentRegistrar {
4243
Qualified.qualified(Background.class, ExecutorService.class);
4344
private final Qualified<ExecutorService> blockingExecutorService =
4445
Qualified.qualified(Blocking.class, ExecutorService.class);
46+
private final Qualified<ExecutorService> lightweightExecutorService =
47+
Qualified.qualified(Lightweight.class, ExecutorService.class);
4548

4649
static {
4750
// Add Crashlytics as a dependency of Sessions when this class is loaded into memory.
@@ -57,6 +60,7 @@ public List<Component<?>> getComponents() {
5760
.add(Dependency.required(FirebaseInstallationsApi.class))
5861
.add(Dependency.required(backgroundExecutorService))
5962
.add(Dependency.required(blockingExecutorService))
63+
.add(Dependency.required(lightweightExecutorService))
6064
.add(Dependency.deferred(CrashlyticsNativeComponent.class))
6165
.add(Dependency.deferred(AnalyticsConnector.class))
6266
.add(Dependency.deferred(FirebaseRemoteConfigInterop.class))
@@ -79,7 +83,8 @@ private FirebaseCrashlytics buildCrashlytics(ComponentContainer container) {
7983
container.getDeferred(AnalyticsConnector.class),
8084
container.getDeferred(FirebaseRemoteConfigInterop.class),
8185
container.get(backgroundExecutorService),
82-
container.get(blockingExecutorService));
86+
container.get(blockingExecutorService),
87+
container.get(lightweightExecutorService));
8388

8489
long duration = System.currentTimeMillis() - startTime;
8590
if (duration > 16) {

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/FirebaseCrashlytics.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public class FirebaseCrashlytics {
6767
@NonNull Deferred<AnalyticsConnector> analyticsConnector,
6868
@NonNull Deferred<FirebaseRemoteConfigInterop> remoteConfigInteropDeferred,
6969
ExecutorService backgroundExecutorService,
70-
ExecutorService blockingExecutorService) {
70+
ExecutorService blockingExecutorService,
71+
ExecutorService lightExecutorService) {
7172

7273
Context context = app.getApplicationContext();
7374
final String appIdentifier = context.getPackageName();
@@ -160,7 +161,8 @@ public class FirebaseCrashlytics {
160161
// Kick off actually fetching the settings.
161162
settingsController
162163
.loadSettingsData(crashlyticsWorkers)
163-
.addOnFailureListener(ex -> Logger.getLogger().e("Error fetching settings.", ex));
164+
.addOnFailureListener(
165+
lightExecutorService, ex -> Logger.getLogger().e("Error fetching settings.", ex));
164166

165167
final boolean finishCoreInBackground = core.onPreExecute(appData, settingsController);
166168

firebase-functions/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Unreleased
2+
* [fixed] Fixed HttpsCallableResult.data resolution in Kotlin
3+
4+
# 21.1.0
25
* [changed] Migrated to Kotlin
36

47
# 21.0.0

firebase-functions/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ package com.google.firebase.functions {
110110

111111
public final class HttpsCallableResult {
112112
method @Nullable public Object getData();
113+
field @Nullable public final Object data;
113114
}
114115

115116
public final class Serializer {

firebase-functions/src/androidTest/java/com/google/firebase/functions/ktx/CallTests.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CallTests {
6464
)
6565

6666
var function = functions.getHttpsCallable("dataTest")
67-
val actual = Tasks.await(function.call(input)).getData()
67+
val actual = Tasks.await(function.call(input)).data
6868

6969
assertThat(actual).isInstanceOf(Map::class.java)
7070
@Suppress("UNCHECKED_CAST") val map = actual as Map<String, *>
@@ -77,7 +77,7 @@ class CallTests {
7777
fun testNullDataCall() {
7878
val functions = Firebase.functions(app)
7979
var function = functions.getHttpsCallable("nullTest")
80-
val actual = Tasks.await(function.call(null)).getData()
80+
val actual = Tasks.await(function.call(null)).data
8181

8282
assertThat(actual).isNull()
8383
}
@@ -86,7 +86,7 @@ class CallTests {
8686
fun testEmptyDataCall() {
8787
val functions = Firebase.functions(app)
8888
var function = functions.getHttpsCallable("nullTest")
89-
val actual = Tasks.await(function.call()).getData()
89+
val actual = Tasks.await(function.call()).data
9090

9191
assertThat(actual).isNull()
9292
}

firebase-functions/src/main/java/com/google/firebase/functions/HttpsCallableResult.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@ package com.google.firebase.functions
1616
/** The result of calling a HttpsCallableReference function. */
1717
public class HttpsCallableResult
1818
internal constructor( // The actual result data, as generic types decoded from JSON.
19-
private val data: Any?) {
19+
/**
20+
* The data that was returned from the Callable HTTPS trigger.
21+
*
22+
* The data is in the form of native Java objects. For example, if your trigger returned an array,
23+
* this object would be a `List<Object>`. If your trigger returned a JavaScript object with keys
24+
* and values, this object would be a `Map<String, Object>`.
25+
*/
26+
@JvmField public val data: Any?
27+
) {
2028
/**
2129
* Returns the data that was returned from the Callable HTTPS trigger.
2230
*
2331
* The data is in the form of native Java objects. For example, if your trigger returned an array,
24-
* this object would be a List<Object>. If your trigger returned a JavaScript object with keys and
25-
* values, this object would be a Map<String, Object>.
32+
* this object would be a `List<Object>`. If your trigger returned a JavaScript object with keys
33+
* and values, this object would be a `Map<String, Object>`.
2634
*/
2735
public fun getData(): Any? {
2836
return data

gradle/libs.versions.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ android-lint = "31.3.2"
77
autovalue = "1.10.1"
88
coroutines = "1.7.3"
99
dagger = "2.43.2"
10+
featureDelivery = "2.1.0"
11+
firebaseCommon = "21.0.0"
12+
firebaseComponents = "18.0.0"
1013
grpc = "1.62.2"
1114
grpcKotlin = "1.4.1"
1215
javalite = "3.25.5"
@@ -45,7 +48,10 @@ autovalue-annotations = { module = "com.google.auto.value:auto-value-annotations
4548
dagger-dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
4649
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
4750
errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version = "2.26.0" }
51+
feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "featureDelivery" }
4852
findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
53+
firebase-common = { module = "com.google.firebase:firebase-common", version.ref = "firebaseCommon" }
54+
firebase-components = { module = "com.google.firebase:firebase-components", version.ref = "firebaseComponents" }
4955
grpc-android = { module = "io.grpc:grpc-android", version.ref = "grpc" }
5056
grpc-kotlin-stub = { module = "io.grpc:grpc-kotlin-stub", version.ref = "grpcKotlin" }
5157
grpc-okhttp = { module = "io.grpc:grpc-okhttp", version.ref = "grpc" }

0 commit comments

Comments
 (0)