Skip to content

Commit f97b674

Browse files
authored
Merge branch 'main' into daymon-migrate-firebaselibext
2 parents c7d4208 + b6d0107 commit f97b674

File tree

33 files changed

+139
-102
lines changed

33 files changed

+139
-102
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Unreleased
22
* [changed] Updated protobuf dependency to `3.25.5` to fix
3-
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
3+
[CVE-2024-7254](https://nvd.nist.gov/vuln/detail/CVE-2024-7254).
44

firebase-config/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unreleased
22
* [changed] Updated protobuf dependency to `3.25.5` to fix
3-
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
3+
[CVE-2024-7254](https://nvd.nist.gov/vuln/detail/CVE-2024-7254).
44

55
# 22.0.0
66
* [changed] Bump internal dependencies

firebase-crashlytics/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unreleased
22
* [changed] Updated protobuf dependency to `3.25.5` to fix
3-
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
3+
[CVE-2024-7254](https://nvd.nist.gov/vuln/detail/CVE-2024-7254).
44

55

66
# 19.2.0

firebase-dataconnect/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unreleased
22
* [changed] Updated protobuf dependency to `3.25.5` to fix
3-
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
3+
[CVE-2024-7254](https://nvd.nist.gov/vuln/detail/CVE-2024-7254).
44

55
# 16.0.0-beta01
66
* [feature] Initial release of the Data Connect SDK (public preview). Learn how to

firebase-dataconnect/firebase-dataconnect.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ firebaseLibrary {
3131
publishJavadoc = false
3232
previewMode = "beta"
3333
releaseNotes {
34-
name.set("{{firebase_data_connect}}")
35-
versionName.set("dataconnect")
34+
name.set("{{data_connect_short}}")
35+
versionName.set("data-connect")
3636
hasKTX.set(false)
3737
}
3838

firebase-firestore/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Unreleased
22
* [changed] Update Firestore proto definitions. [#6369](//github.com/firebase/firebase-android-sdk/pull/6369)
33
* [changed] Updated protobuf dependency to `3.25.5` to fix
4-
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
4+
[CVE-2024-7254](https://nvd.nist.gov/vuln/detail/CVE-2024-7254).
55

66
# 25.1.0
77
* [feature] Add support for the VectorValue type. [#6154](//github.com/firebase/firebase-android-sdk/pull/6154)

firebase-functions/api.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,9 @@ package com.google.firebase.functions {
8181
method public boolean getLimitedUseAppCheckTokens();
8282
method public long getTimeout();
8383
method public void setTimeout(long timeout, @NonNull java.util.concurrent.TimeUnit units);
84-
field @NonNull public static final com.google.firebase.functions.HttpsCallOptions.Companion Companion;
8584
field public final boolean limitedUseAppCheckTokens;
8685
}
8786

88-
public static final class HttpsCallOptions.Companion {
89-
}
90-
9187
public final class HttpsCallableOptions {
9288
method public boolean getLimitedUseAppCheckTokens();
9389
field public final boolean limitedUseAppCheckTokens;

firebase-functions/firebase-functions.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
// Copyright 2022 Google LLC
24
//
35
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -55,6 +57,20 @@ android {
5557
testOptions.unitTests.isIncludeAndroidResources = true
5658
}
5759

60+
// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
61+
// classes, methods, or properties have implicit `public` visibility. This check helps
62+
// avoid accidentally leaking elements into the public API, requiring that any public
63+
// element be explicitly declared as `public`.
64+
// https://github.com/Kotlin/KEEP/blob/master/proposals/explicit-api-mode.md
65+
// https://chao2zhang.medium.com/explicit-api-mode-for-kotlin-on-android-b8264fdd76d1
66+
tasks.withType<KotlinCompile>().all {
67+
if (!name.contains("test", ignoreCase = true)) {
68+
if (!kotlinOptions.freeCompilerArgs.contains("-Xexplicit-api=strict")) {
69+
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
70+
}
71+
}
72+
}
73+
5874
dependencies {
5975
javadocClasspath("org.codehaus.mojo:animal-sniffer-annotations:1.21")
6076
javadocClasspath(libs.autovalue.annotations)

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import org.json.JSONException
4747
import org.json.JSONObject
4848

4949
/** FirebaseFunctions lets you call Cloud Functions for Firebase. */
50-
class FirebaseFunctions
50+
public class FirebaseFunctions
5151
@AssistedInject
5252
internal constructor(
5353
context: Context,
@@ -105,22 +105,25 @@ internal constructor(
105105
}
106106

107107
/** Returns a reference to the callable HTTPS trigger with the given name. */
108-
fun getHttpsCallable(name: String): HttpsCallableReference {
108+
public fun getHttpsCallable(name: String): HttpsCallableReference {
109109
return HttpsCallableReference(this, name, HttpsCallOptions())
110110
}
111111

112112
/** Returns a reference to the callable HTTPS trigger with the provided URL. */
113-
fun getHttpsCallableFromUrl(url: URL): HttpsCallableReference {
113+
public fun getHttpsCallableFromUrl(url: URL): HttpsCallableReference {
114114
return HttpsCallableReference(this, url, HttpsCallOptions())
115115
}
116116

117117
/** Returns a reference to the callable HTTPS trigger with the given name and call options. */
118-
fun getHttpsCallable(name: String, options: HttpsCallableOptions): HttpsCallableReference {
118+
public fun getHttpsCallable(name: String, options: HttpsCallableOptions): HttpsCallableReference {
119119
return HttpsCallableReference(this, name, HttpsCallOptions(options))
120120
}
121121

122122
/** Returns a reference to the callable HTTPS trigger with the provided URL and call options. */
123-
fun getHttpsCallableFromUrl(url: URL, options: HttpsCallableOptions): HttpsCallableReference {
123+
public fun getHttpsCallableFromUrl(
124+
url: URL,
125+
options: HttpsCallableOptions
126+
): HttpsCallableReference {
124127
return HttpsCallableReference(this, url, HttpsCallOptions(options))
125128
}
126129

@@ -149,7 +152,7 @@ internal constructor(
149152
}
150153

151154
@Deprecated("Use {@link #useEmulator(String, int)} to connect to the emulator. ")
152-
fun useFunctionsEmulator(origin: String) {
155+
public fun useFunctionsEmulator(origin: String) {
153156
Preconditions.checkNotNull(origin, "origin cannot be null")
154157
urlFormat = "$origin/%2\$s/%1\$s/%3\$s"
155158
}
@@ -162,7 +165,7 @@ internal constructor(
162165
* @param host the emulator host (for example, 10.0.2.2)
163166
* @param port the emulator port (for example, 5001)
164167
*/
165-
fun useEmulator(host: String, port: Int) {
168+
public fun useEmulator(host: String, port: Int) {
166169
emulatorSettings = EmulatedServiceSettings(host, port)
167170
}
168171

@@ -318,7 +321,7 @@ internal constructor(
318321
return tcs.task
319322
}
320323

321-
companion object {
324+
public companion object {
322325
/** A task that will be resolved once ProviderInstaller has installed what it needs to. */
323326
private val providerInstalled = TaskCompletionSource<Void>()
324327

@@ -370,7 +373,7 @@ internal constructor(
370373
* `"us-central1"` or `"https://mydomain.com"`.
371374
*/
372375
@JvmStatic
373-
fun getInstance(app: FirebaseApp, regionOrCustomDomain: String): FirebaseFunctions {
376+
public fun getInstance(app: FirebaseApp, regionOrCustomDomain: String): FirebaseFunctions {
374377
Preconditions.checkNotNull(app, "You must call FirebaseApp.initializeApp first.")
375378
Preconditions.checkNotNull(regionOrCustomDomain)
376379
val component = app.get(FunctionsMultiResourceComponent::class.java)
@@ -384,7 +387,7 @@ internal constructor(
384387
* @param app The app for the Firebase project.
385388
*/
386389
@JvmStatic
387-
fun getInstance(app: FirebaseApp): FirebaseFunctions {
390+
public fun getInstance(app: FirebaseApp): FirebaseFunctions {
388391
return getInstance(app, "us-central1")
389392
}
390393

@@ -395,13 +398,13 @@ internal constructor(
395398
* `"us-central1"` or `"https://mydomain.com"`.
396399
*/
397400
@JvmStatic
398-
fun getInstance(regionOrCustomDomain: String): FirebaseFunctions {
401+
public fun getInstance(regionOrCustomDomain: String): FirebaseFunctions {
399402
return getInstance(FirebaseApp.getInstance(), regionOrCustomDomain)
400403
}
401404

402405
/** Creates a Cloud Functions client with the default app. */
403406
@JvmStatic
404-
fun getInstance(): FirebaseFunctions {
407+
public fun getInstance(): FirebaseFunctions {
405408
return getInstance(FirebaseApp.getInstance(), "us-central1")
406409
}
407410
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import org.json.JSONObject
2121
// TODO: This is a copy of FirebaseFirestoreException.
2222
// We should investigate whether we can at least share the Code enum.
2323
/** The class for all Exceptions thrown by FirebaseFunctions. */
24-
class FirebaseFunctionsException : FirebaseException {
24+
public class FirebaseFunctionsException : FirebaseException {
2525
/**
2626
* The set of error status codes that can be returned from a Callable HTTPS tigger. These are the
2727
* canonical error codes for Google APIs, as documented here:
2828
* https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L26
2929
*/
30-
enum class Code(private val value: Int) {
30+
public enum class Code(private val value: Int) {
3131
/**
3232
* The operation completed successfully. FirebaseFunctionsException will never have a status of
3333
* OK.
@@ -105,7 +105,7 @@ class FirebaseFunctionsException : FirebaseException {
105105
/** The request does not have valid authentication credentials for the operation. */
106106
UNAUTHENTICATED(16);
107107

108-
companion object {
108+
public companion object {
109109
// Create the canonical list of Status instances indexed by their code values.
110110
private val STATUS_LIST = buildStatusList()
111111
private fun buildStatusList(): SparseArray<Code> {
@@ -121,7 +121,7 @@ class FirebaseFunctionsException : FirebaseException {
121121
}
122122

123123
@JvmStatic
124-
fun fromValue(value: Int): Code {
124+
public fun fromValue(value: Int): Code {
125125
return STATUS_LIST[value, UNKNOWN]
126126
}
127127

@@ -134,7 +134,7 @@ class FirebaseFunctionsException : FirebaseException {
134134
* @return The corresponding Code, or Code.UNKNOWN if none.
135135
*/
136136
@JvmStatic
137-
fun fromHttpStatus(status: Int): Code {
137+
public fun fromHttpStatus(status: Int): Code {
138138
when (status) {
139139
200 -> return OK
140140
400 -> return INVALID_ARGUMENT
@@ -159,14 +159,14 @@ class FirebaseFunctionsException : FirebaseException {
159159
*
160160
* @return the code for the FirebaseFunctionsException
161161
*/
162-
val code: Code
162+
public val code: Code
163163

164164
/**
165165
* Gets the details object, if one was included in the error response.
166166
*
167167
* @return the object included in the "details" field of the response.
168168
*/
169-
val details: Any?
169+
public val details: Any?
170170

171171
internal constructor(message: String, code: Code, details: Any?) : super(message) {
172172
this.code = code
@@ -183,7 +183,7 @@ class FirebaseFunctionsException : FirebaseException {
183183
this.details = details
184184
}
185185

186-
companion object {
186+
public companion object {
187187
/**
188188
* Takes an HTTP response and returns the corresponding Exception if any.
189189
*
@@ -193,7 +193,7 @@ class FirebaseFunctionsException : FirebaseException {
193193
* @return The corresponding Exception, or null if none.
194194
*/
195195
@JvmStatic
196-
fun fromResponse(
196+
public fun fromResponse(
197197
code: Code,
198198
body: String?,
199199
serializer: Serializer

0 commit comments

Comments
 (0)