Skip to content

Commit 2117741

Browse files
authored
Merge branch 'main' into dconeybe/dataconnect/UserDefinedEnumsInternal
2 parents ce899f5 + a0f67be commit 2117741

File tree

9 files changed

+63
-42
lines changed

9 files changed

+63
-42
lines changed

.github/workflows/dataconnect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
3535
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
3636
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
37-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.10.1' }}
37+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.11.0' }}
3838
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
3939
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
4040
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}

.github/workflows/dataconnect_demo_app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818

1919
env:
2020
FDC_NODE_VERSION: ${{ inputs.nodeVersion || '20' }}
21-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.10.1' }}
21+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.11.0' }}
2222
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
2323
FDC_FIREBASE_TOOLS_DIR: ${{ github.workspace }}/firebase-tools
2424
FDC_FIREBASE_COMMAND: ${{ github.workspace }}/firebase-tools/node_modules/.bin/firebase

firebase-dataconnect/demo/build.gradle.kts

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,35 @@ import java.nio.charset.StandardCharsets
1919

2020
plugins {
2121
// Use whichever versions of these dependencies suit your application.
22-
// The versions shown here were the latest versions as of June 10, 2025.
22+
// The versions shown here were the latest versions as of July 17, 2025.
2323
// Note, however, that the version of kotlin("plugin.serialization") _must_,
2424
// in general, match the version of kotlin("android").
25-
id("com.android.application") version "8.11.0"
26-
id("com.google.gms.google-services") version "4.4.2"
25+
id("com.android.application") version "8.11.1"
26+
id("com.google.gms.google-services") version "4.4.3"
2727
val kotlinVersion = "2.1.10"
2828
kotlin("android") version kotlinVersion
2929
kotlin("plugin.serialization") version kotlinVersion
3030

3131
// The following code in this "plugins" block can be omitted from customer
3232
// facing documentation as it is an implementation detail of this application.
33-
id("com.diffplug.spotless") version "7.0.0.BETA4"
33+
id("com.diffplug.spotless") version "7.1.0"
3434

3535
id("org.jetbrains.dokka") version "2.0.0"
3636
}
3737

3838
dependencies {
3939
// Use whichever versions of these dependencies suit your application.
40-
// The versions shown here were the latest versions as of June 10, 2025.
40+
// The versions shown here were the latest versions as of July 17, 2025.
4141

4242
// Data Connect
43-
implementation(platform("com.google.firebase:firebase-bom:33.15.0"))
43+
implementation(platform("com.google.firebase:firebase-bom:33.16.0"))
4444
implementation("com.google.firebase:firebase-dataconnect")
45-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
46-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1")
47-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.8.1")
45+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
46+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
47+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.9.0")
4848
implementation("androidx.appcompat:appcompat:1.7.1")
4949
implementation("androidx.activity:activity-ktx:1.10.1")
50-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1")
50+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.2")
5151
implementation("com.google.android.material:material:1.12.0")
5252

5353
// The following code in this "dependencies" block can be omitted from customer
@@ -70,10 +70,10 @@ dokka {
7070

7171
android {
7272
namespace = "com.google.firebase.dataconnect.minimaldemo"
73-
compileSdk = 35
73+
compileSdk = 36
7474
defaultConfig {
7575
minSdk = 23
76-
targetSdk = 35
76+
targetSdk = 36
7777
versionCode = 1
7878
versionName = "1.0"
7979
}
@@ -138,6 +138,8 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
138138
@get:PathSensitive(PathSensitivity.ABSOLUTE)
139139
abstract val dataConnectEmulatorExecutable: RegularFileProperty
140140

141+
@get:Input @get:Optional abstract val dataConnectPreviewFlags: Property<String>
142+
141143
@get:OutputDirectory abstract val outputDirectory: DirectoryProperty
142144

143145
@get:Internal abstract val workDirectory: DirectoryProperty
@@ -155,6 +157,7 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
155157
val firebaseCommand: String = firebaseCommand.get()
156158
val nodeExecutableDirectory: String? = nodeExecutableDirectory.orNull
157159
val dataConnectEmulatorExecutable: File? = dataConnectEmulatorExecutable.orNull?.asFile
160+
val dataConnectPreviewFlags: String? = dataConnectPreviewFlags.orNull
158161
val outputDirectory: File = outputDirectory.get().asFile
159162
val workDirectory: File = workDirectory.get().asFile
160163

@@ -163,6 +166,7 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
163166
logger.info("firebaseCommand: {}", firebaseCommand)
164167
logger.info("nodeExecutableDirectory: {}", nodeExecutableDirectory)
165168
logger.info("dataConnectEmulatorExecutable: {}", dataConnectEmulatorExecutable)
169+
logger.info("dataConnectPreviewFlags: {}", dataConnectPreviewFlags)
166170
logger.info("outputDirectory: {}", outputDirectory.absolutePath)
167171
logger.info("workDirectory: {}", workDirectory.absolutePath)
168172

@@ -187,14 +191,15 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
187191
firebaseCommand = firebaseCommand,
188192
nodeExecutableDirectory = nodeExecutableDirectory,
189193
dataConnectEmulatorExecutable = dataConnectEmulatorExecutable,
194+
dataConnectPreviewFlags = dataConnectPreviewFlags,
190195
path = providerFactory.environmentVariable("PATH").orNull,
191196
)
192197
args("--debug", "dataconnect:sdk:generate")
193198
workingDir(inputDirectory)
194199
isIgnoreExitValue = false
195-
if (logStream !== null) {
196-
standardOutput = logStream
197-
errorOutput = logStream
200+
logStream?.let {
201+
standardOutput = it
202+
errorOutput = it
198203
}
199204
}
200205
}
@@ -215,31 +220,21 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
215220
firebaseCommand: String,
216221
nodeExecutableDirectory: String?,
217222
dataConnectEmulatorExecutable: File?,
223+
dataConnectPreviewFlags: String?,
218224
path: String?,
219225
) {
220226
execSpec.setCommandLine(firebaseCommand)
221227

222-
val newPath: String? =
223-
if (nodeExecutableDirectory === null) {
224-
null
225-
} else {
226-
if (path === null) {
227-
nodeExecutableDirectory
228-
} else {
229-
nodeExecutableDirectory + File.pathSeparator + path
230-
}
231-
}
232-
233-
if (newPath !== null) {
228+
nodeExecutableDirectory?.let {
229+
val newPath = if (path === null) it else (it + File.pathSeparator + path)
234230
execSpec.environment("PATH", newPath)
235231
}
236232

237-
if (dataConnectEmulatorExecutable !== null) {
238-
execSpec.environment(
239-
"DATACONNECT_EMULATOR_BINARY_PATH",
240-
dataConnectEmulatorExecutable.absolutePath,
241-
)
233+
dataConnectEmulatorExecutable?.let {
234+
execSpec.environment("DATACONNECT_EMULATOR_BINARY_PATH", it.absolutePath)
242235
}
236+
237+
dataConnectPreviewFlags?.let { execSpec.environment("DATA_CONNECT_PREVIEW", it) }
243238
}
244239
}
245240
}
@@ -301,6 +296,9 @@ run {
301296
projectDirectory.file(it)
302297
}
303298

299+
dataConnectPreviewFlags =
300+
project.providers.gradleProperty("dataConnect.demo.dataConnectPreviewFlags")
301+
304302
val path = providers.environmentVariable("PATH")
305303
firebaseToolsVersion =
306304
providers
@@ -310,6 +308,7 @@ run {
310308
firebaseCommand = firebaseCommand.get(),
311309
nodeExecutableDirectory = nodeExecutableDirectory.orNull,
312310
dataConnectEmulatorExecutable = dataConnectEmulatorExecutable.orNull?.asFile,
311+
dataConnectPreviewFlags = dataConnectPreviewFlags.orNull,
313312
path = path.orNull,
314313
)
315314
args("--version")

firebase-dataconnect/demo/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2929
// downloading an official version and using it.
3030
// See build.gradle.kts for details.
3131
//dataConnect.demo.dataConnectEmulatorExecutable=/path/to/cli
32+
33+
// A comma-separated list of "preview flags" to specify to the Data Connect emulator and codegen.
34+
// This is used to enable features that are not (yet) intended for end-user consumption.
35+
// See build.gradle.kts for details.
36+
//dataConnect.demo.dataConnectPreviewFlags=flag1,flag2,flag3

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"defaultVersion": "2.9.1",
2+
"defaultVersion": "2.10.0",
33
"versions": [
44
{
55
"version": "1.3.4",
@@ -882,6 +882,24 @@
882882
"os": "linux",
883883
"size": 29233336,
884884
"sha512DigestHex": "e320752834236d4b1cb67fa41c70e11f5b374832ffb4e2be31a06f6860ec389833fad62b3070d3ec16ea40fcf719bee8855acacb0627d943f0b8807cecaed564"
885+
},
886+
{
887+
"version": "2.10.0",
888+
"os": "windows",
889+
"size": 29824000,
890+
"sha512DigestHex": "fb430463430af8781c9b1c40488c3abf9362df076be43e966d54cf7d1d8cc39436cc7fc361c3ba45105b58ec6d10021456cb22f7ac050905a06d86127c22c5cb"
891+
},
892+
{
893+
"version": "2.10.0",
894+
"os": "macos",
895+
"size": 29332320,
896+
"sha512DigestHex": "9c4aa8d4dbea8bde36a53e1477d557c6a31dc16ca25ded38a0b06a5a4849222779be6bf6559c0e3c7f89970c3e9aeda5cbc15573a0832bd83c8d463294bc7f4f"
897+
},
898+
{
899+
"version": "2.10.0",
900+
"os": "linux",
901+
"size": 29257912,
902+
"sha512DigestHex": "93e71bdc76510cf70410338f016819b97abe7a4b372ee52c0f59c0c58f23814c3f94cf2e6772dce5a8fbabda582f363cabb808b4284dfa142b6bc94d305088a4"
885903
}
886904
]
887905
}

firebase-dataconnect/src/test/kotlin/com/google/firebase/dataconnect/serializers/JavaTimeLocalDateSerializerUnitTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ class JavaTimeLocalDateSerializerUnitTest {
222222
}
223223

224224
fun Arb.Companion.unparseableDash(): Arb<String> {
225-
val invalidString = string(1..5, codepoints.filterNot { it.value == '-'.code })
225+
val invalidString =
226+
string(1..5, codepoints.filterNot { it.value == '-'.code || Character.isDigit(it.value) })
226227
return arbitrary { rs ->
227228
val flags = Array(3) { rs.random.nextBoolean() }
228229
if (!flags[0]) {

firebase-dataconnect/src/test/kotlin/com/google/firebase/dataconnect/serializers/KotlinxDatetimeLocalDateSerializerUnitTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ class KotlinxDatetimeLocalDateSerializerUnitTest {
225225
}
226226

227227
fun Arb.Companion.unparseableDash(): Arb<String> {
228-
val invalidString = string(1..5, codepoints.filterNot { it.value == '-'.code })
228+
val invalidString =
229+
string(1..5, codepoints.filterNot { it.value == '-'.code || Character.isDigit(it.value) })
229230
return arbitrary { rs ->
230231
val flags = Array(3) { rs.random.nextBoolean() }
231232
if (!flags[0]) {

firebase-dataconnect/src/test/kotlin/com/google/firebase/dataconnect/serializers/LocalDateSerializerUnitTest.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ class LocalDateSerializerUnitTest {
206206

207207
fun Arb.Companion.unparseableDash(): Arb<String> {
208208
val invalidString =
209-
string(
210-
1..5,
211-
codepoints.filterNot { it.value == '-'.code || it.value in '0'.code..'9'.code }
212-
)
209+
string(1..5, codepoints.filterNot { it.value == '-'.code || Character.isDigit(it.value) })
213210
return arbitrary { rs ->
214211
val flags = Array(3) { rs.random.nextBoolean() }
215212
if (!flags[0]) {

plugins/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies {
6060
implementation(libs.bundles.maven.resolver)
6161

6262
implementation("com.google.guava:guava:31.1-jre")
63-
implementation("org.ow2.asm:asm-tree:9.5")
63+
implementation("org.ow2.asm:asm-tree:9.8")
6464
implementation("org.eclipse.jgit:org.eclipse.jgit:7.1.0.202411261347-r")
6565
implementation(libs.kotlinx.serialization.json)
6666
implementation("com.google.code.gson:gson:2.8.9")

0 commit comments

Comments
 (0)