@@ -197,9 +197,9 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
197
197
args(" --debug" , " dataconnect:sdk:generate" )
198
198
workingDir(inputDirectory)
199
199
isIgnoreExitValue = false
200
- if ( logStream != = null ) {
201
- standardOutput = logStream
202
- errorOutput = logStream
200
+ logStream?. let {
201
+ standardOutput = it
202
+ errorOutput = it
203
203
}
204
204
}
205
205
}
@@ -225,31 +225,16 @@ abstract class DataConnectGenerateSourcesTask : DefaultTask() {
225
225
) {
226
226
execSpec.setCommandLine(firebaseCommand)
227
227
228
- val newPath: String? =
229
- if (nodeExecutableDirectory == = null ) {
230
- null
231
- } else {
232
- if (path == = null ) {
233
- nodeExecutableDirectory
234
- } else {
235
- nodeExecutableDirectory + File .pathSeparator + path
236
- }
237
- }
238
-
239
- if (newPath != = null ) {
228
+ nodeExecutableDirectory?.let {
229
+ val newPath = if (path == = null ) it else (it + File .pathSeparator + path)
240
230
execSpec.environment(" PATH" , newPath)
241
231
}
242
232
243
- if (dataConnectEmulatorExecutable != = null ) {
244
- execSpec.environment(
245
- " DATACONNECT_EMULATOR_BINARY_PATH" ,
246
- dataConnectEmulatorExecutable.absolutePath,
247
- )
233
+ dataConnectEmulatorExecutable?.let {
234
+ execSpec.environment(" DATACONNECT_EMULATOR_BINARY_PATH" , it.absolutePath)
248
235
}
249
236
250
- if (dataConnectPreviewFlags != = null ) {
251
- execSpec.environment(" DATA_CONNECT_PREVIEW" , dataConnectPreviewFlags)
252
- }
237
+ dataConnectPreviewFlags?.let { execSpec.environment(" DATA_CONNECT_PREVIEW" , it) }
253
238
}
254
239
}
255
240
}
0 commit comments