Skip to content

Commit 590cc9a

Browse files
authored
Merge branch 'main' into td/record-exception
2 parents 1b5f09e + 04bfe55 commit 590cc9a

File tree

10 files changed

+31
-13
lines changed

10 files changed

+31
-13
lines changed

.github/workflows/build-src-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-src-check
1+
name: Check buildSrc
22

33
on:
44
pull_request:

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changelog
1+
name: Verify changelog update
22

33
on:
44
pull_request

.github/workflows/fireci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: fireci
1+
name: Run fireci tests
22

33
on:
44
pull_request:

.github/workflows/update-cpp-sdk-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# *another* workflow on the Firebase C++ SDK, which will check for the Android
33
# version update and create a PR updating its dependencies if any version
44
# numbers changed.
5-
name: update-cpp-sdk-on-release
5+
name: Update C++ SDKs on release
66
on:
77
push:
88
branches:

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-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)