@@ -19,35 +19,35 @@ import java.nio.charset.StandardCharsets
19
19
20
20
plugins {
21
21
// 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.
23
23
// Note, however, that the version of kotlin("plugin.serialization") _must_,
24
24
// 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 "
27
27
val kotlinVersion = " 2.1.10"
28
28
kotlin(" android" ) version kotlinVersion
29
29
kotlin(" plugin.serialization" ) version kotlinVersion
30
30
31
31
// The following code in this "plugins" block can be omitted from customer
32
32
// 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 "
34
34
35
35
id(" org.jetbrains.dokka" ) version " 2.0.0"
36
36
}
37
37
38
38
dependencies {
39
39
// 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.
41
41
42
42
// Data Connect
43
- implementation(platform(" com.google.firebase:firebase-bom:33.15 .0" ))
43
+ implementation(platform(" com.google.firebase:firebase-bom:33.16 .0" ))
44
44
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 " )
48
48
implementation(" androidx.appcompat:appcompat:1.7.1" )
49
49
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 " )
51
51
implementation(" com.google.android.material:material:1.12.0" )
52
52
53
53
// The following code in this "dependencies" block can be omitted from customer
@@ -70,10 +70,10 @@ dokka {
70
70
71
71
android {
72
72
namespace = " com.google.firebase.dataconnect.minimaldemo"
73
- compileSdk = 35
73
+ compileSdk = 36
74
74
defaultConfig {
75
75
minSdk = 23
76
- targetSdk = 35
76
+ targetSdk = 36
77
77
versionCode = 1
78
78
versionName = " 1.0"
79
79
}
@@ -138,6 +138,8 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
138
138
@get:PathSensitive(PathSensitivity .ABSOLUTE )
139
139
abstract val dataConnectEmulatorExecutable: RegularFileProperty
140
140
141
+ @get:Input @get:Optional abstract val dataConnectPreviewFlags: Property <String >
142
+
141
143
@get:OutputDirectory abstract val outputDirectory: DirectoryProperty
142
144
143
145
@get:Internal abstract val workDirectory: DirectoryProperty
@@ -155,6 +157,7 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
155
157
val firebaseCommand: String = firebaseCommand.get()
156
158
val nodeExecutableDirectory: String? = nodeExecutableDirectory.orNull
157
159
val dataConnectEmulatorExecutable: File ? = dataConnectEmulatorExecutable.orNull?.asFile
160
+ val dataConnectPreviewFlags: String? = dataConnectPreviewFlags.orNull
158
161
val outputDirectory: File = outputDirectory.get().asFile
159
162
val workDirectory: File = workDirectory.get().asFile
160
163
@@ -163,6 +166,7 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
163
166
logger.info(" firebaseCommand: {}" , firebaseCommand)
164
167
logger.info(" nodeExecutableDirectory: {}" , nodeExecutableDirectory)
165
168
logger.info(" dataConnectEmulatorExecutable: {}" , dataConnectEmulatorExecutable)
169
+ logger.info(" dataConnectPreviewFlags: {}" , dataConnectPreviewFlags)
166
170
logger.info(" outputDirectory: {}" , outputDirectory.absolutePath)
167
171
logger.info(" workDirectory: {}" , workDirectory.absolutePath)
168
172
@@ -187,14 +191,15 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
187
191
firebaseCommand = firebaseCommand,
188
192
nodeExecutableDirectory = nodeExecutableDirectory,
189
193
dataConnectEmulatorExecutable = dataConnectEmulatorExecutable,
194
+ dataConnectPreviewFlags = dataConnectPreviewFlags,
190
195
path = providerFactory.environmentVariable(" PATH" ).orNull,
191
196
)
192
197
args(" --debug" , " dataconnect:sdk:generate" )
193
198
workingDir(inputDirectory)
194
199
isIgnoreExitValue = false
195
- if ( logStream != = null ) {
196
- standardOutput = logStream
197
- errorOutput = logStream
200
+ logStream?. let {
201
+ standardOutput = it
202
+ errorOutput = it
198
203
}
199
204
}
200
205
}
@@ -215,31 +220,21 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
215
220
firebaseCommand : String ,
216
221
nodeExecutableDirectory : String? ,
217
222
dataConnectEmulatorExecutable : File ? ,
223
+ dataConnectPreviewFlags : String? ,
218
224
path : String? ,
219
225
) {
220
226
execSpec.setCommandLine(firebaseCommand)
221
227
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)
234
230
execSpec.environment(" PATH" , newPath)
235
231
}
236
232
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)
242
235
}
236
+
237
+ dataConnectPreviewFlags?.let { execSpec.environment(" DATA_CONNECT_PREVIEW" , it) }
243
238
}
244
239
}
245
240
}
@@ -301,6 +296,9 @@ run {
301
296
projectDirectory.file(it)
302
297
}
303
298
299
+ dataConnectPreviewFlags =
300
+ project.providers.gradleProperty(" dataConnect.demo.dataConnectPreviewFlags" )
301
+
304
302
val path = providers.environmentVariable(" PATH" )
305
303
firebaseToolsVersion =
306
304
providers
@@ -310,6 +308,7 @@ run {
310
308
firebaseCommand = firebaseCommand.get(),
311
309
nodeExecutableDirectory = nodeExecutableDirectory.orNull,
312
310
dataConnectEmulatorExecutable = dataConnectEmulatorExecutable.orNull?.asFile,
311
+ dataConnectPreviewFlags = dataConnectPreviewFlags.orNull,
313
312
path = path.orNull,
314
313
)
315
314
args(" --version" )
0 commit comments