File tree Expand file tree Collapse file tree 1 file changed +17
-18
lines changed
firebase-dataconnect/demo Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,12 @@ spotless {
108108 }
109109}
110110
111- @DisableCachingByDefault(because = " Code generation is very fast and not worth caching " )
111+ @CacheableTask
112112abstract class DataConnectGenerateSourcesTask : DefaultTask () {
113113
114- @get:InputDirectory abstract val inputDirectory: Property <DirectoryTree >
114+ @get:InputDirectory
115+ @get:PathSensitive(PathSensitivity .RELATIVE )
116+ abstract val inputDirectory: Property <DirectoryTree >
115117
116118 @get:Input abstract val firebaseToolsVersion: Property <String >
117119
@@ -270,22 +272,19 @@ run {
270272
271273 val path = providers.environmentVariable(" PATH" )
272274 firebaseToolsVersion =
273- providers.provider {
274- providers
275- .exec {
276- DataConnectGenerateSourcesTask .configureFirebaseCommand(
277- this ,
278- firebaseCommand = firebaseCommand.get(),
279- nodeExecutableDirectory = nodeExecutableDirectory.orNull,
280- path = path.orNull,
281- )
282- args(" --version" )
283- }
284- .standardOutput
285- .asText
286- .get()
287- .trim()
288- }
275+ providers
276+ .exec {
277+ DataConnectGenerateSourcesTask .configureFirebaseCommand(
278+ this ,
279+ firebaseCommand = firebaseCommand.get(),
280+ nodeExecutableDirectory = nodeExecutableDirectory.orNull,
281+ path = path.orNull,
282+ )
283+ args(" --version" )
284+ }
285+ .standardOutput
286+ .asText
287+ .map { it.trim() }
289288
290289 workDirectory = layout.buildDirectory.dir(name)
291290 }
You can’t perform that action at this time.
0 commit comments