Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions firebase-dataconnect/demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ spotless {
}
}

@DisableCachingByDefault(because = "Code generation is very fast and not worth caching")
@CacheableTask
abstract class DataConnectGenerateSourcesTask : DefaultTask() {

@get:InputDirectory abstract val inputDirectory: Property<DirectoryTree>
@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val inputDirectory: Property<DirectoryTree>

@get:Input abstract val firebaseToolsVersion: Property<String>

Expand Down Expand Up @@ -270,22 +272,19 @@ run {

val path = providers.environmentVariable("PATH")
firebaseToolsVersion =
providers.provider {
providers
.exec {
DataConnectGenerateSourcesTask.configureFirebaseCommand(
this,
firebaseCommand = firebaseCommand.get(),
nodeExecutableDirectory = nodeExecutableDirectory.orNull,
path = path.orNull,
)
args("--version")
}
.standardOutput
.asText
.get()
.trim()
}
providers
.exec {
DataConnectGenerateSourcesTask.configureFirebaseCommand(
this,
firebaseCommand = firebaseCommand.get(),
nodeExecutableDirectory = nodeExecutableDirectory.orNull,
path = path.orNull,
)
args("--version")
}
.standardOutput
.asText
.map { it.trim() }

workDirectory = layout.buildDirectory.dir(name)
}
Expand Down
Loading