Remi Gelinas
03/02/2026, 1:48 PMMartin
03/02/2026, 1:48 PMMartin
03/02/2026, 1:49 PMRemi Gelinas
03/02/2026, 1:49 PMMartin
03/02/2026, 1:50 PMMartin
03/02/2026, 1:51 PMRemi Gelinas
03/02/2026, 1:52 PMMartin
03/02/2026, 1:53 PMevery plugin changewhat do you mean by taht?
Remi Gelinas
03/02/2026, 1:53 PMMartin
03/02/2026, 1:54 PMMartin
03/02/2026, 1:54 PMMartin
03/02/2026, 1:54 PMRemi Gelinas
03/02/2026, 1:54 PMwhat do you mean by taht?When I make a change to the plugin source, publish to local maven, and then sync again in my consumer project
Remi Gelinas
03/02/2026, 1:54 PMMartin
03/02/2026, 1:55 PMMartin
03/02/2026, 1:57 PMMartin
03/02/2026, 1:57 PMMartin
03/02/2026, 1:58 PMRemi Gelinas
03/02/2026, 1:59 PMRemi Gelinas
03/02/2026, 2:00 PMMartin
03/02/2026, 2:00 PMMartin
03/02/2026, 2:01 PMMartin
03/02/2026, 2:03 PMVampire
03/02/2026, 2:40 PM-x yourTask to skip the task explicitly.Remi Gelinas
03/02/2026, 2:48 PMMartin
03/02/2026, 2:48 PMThe task implementation classpath is always an input to the task too, because if the classpath changed, the implementation and thus behavior could have changed and thus the result could be differentI'd love to be able to opt-out of this. Most of my tasks implementations delegate to another classloader. The build script classpath has no importance at all in the final outcome.
Remi Gelinas
03/02/2026, 2:50 PMThe task should probably have an outputDir and remove the stale files or else the directory will grow forever but oh well...This doesn't mean I actually have to consume that directory in any dependent tasks, right? I can just clean the dir of any not read in x days or whatever archives
Vampire
03/02/2026, 2:52 PMSo if I made any change to the plugin source, even if it doesn't touch the task, it'll bust the cache? So even between release versions of the plugin this will happen for usersEven if some totally unrelated plugin changes, or the user changes some convention plugin. Another plugin or a user convention plugin could for example also add a
doLast action to your task and so on.
If the classpath changed, Gradle simply cannot know whether the output might eventually be up-to-date.Martin
03/02/2026, 2:53 PMThis doesn't mean I actually have to consume that directoryIf you want to be pedantic, you can probably transform the directory to a
Provider<File> before passing it to the next task. But I would probably just keep growing the directory ^^Martin
03/02/2026, 2:54 PMIf the classpath changed, Gradle simply cannot know whether the output might eventually be up-to-date.Agreed. Still, would be cool to have a way to opt-out. Any call to
doLast {} could crash and then it's on the plugin author to ensure the task action is not sensitive to the build script classpath.Remi Gelinas
03/02/2026, 2:55 PMIf you want to be pedantic, you can probably transform the directory to aOh, you mean you'd use an output dir instead of a file?before passing it to the next task. But I would probably just keep growing the directory ^^Provider<File>
Remi Gelinas
03/02/2026, 2:56 PMMartin
03/02/2026, 2:58 PMMartin
03/02/2026, 2:58 PMv1 to v2 , it deletes v1.foo and downloads v2.fooRemi Gelinas
03/02/2026, 2:58 PMfilecollection.singleFile to assert that in my consumer task tooMartin
03/02/2026, 2:59 PMMartin
03/02/2026, 2:59 PMMartin
03/02/2026, 2:59 PMRemi Gelinas
03/02/2026, 3:00 PM<release-<patchline>.zip , avoid downloadingRemi Gelinas
03/02/2026, 4:57 PMMartin
03/02/2026, 4:59 PMInputFiles for inputsMartin
03/02/2026, 4:59 PMMartin
03/02/2026, 4:59 PMtrying to add a directory to one adds the actual directory itself as a file path, not the files it containsYou're probably looking for something like
files(fileTree(dir))Martin
03/02/2026, 4:59 PMfileTree will "expand" your dirVampire
03/02/2026, 5:05 PMasFileTree on it when you use it, then it resolves to the actual files.Martin
03/02/2026, 5:22 PMasFileTreeMartin
03/02/2026, 5:24 PMRemi Gelinas
03/02/2026, 5:54 PMasSingleFile fine as well if I'm expecting there to only be one file, or should I be using filetree filter methods?Vampire
03/02/2026, 5:55 PMRemi Gelinas
03/02/2026, 6:00 PMRemi Gelinas
03/02/2026, 6:07 PMstringProp.map { fileCollection.asFileTree.matching { include(it)} }Remi Gelinas
03/02/2026, 7:38 PMAdam
03/03/2026, 1:47 PMRemi Gelinas
03/06/2026, 11:10 PMRemi Gelinas
03/07/2026, 2:56 AM.gradle\caches\bundles\release-2026.02.19-1a311a592.zip , with the bundles dir being the output dir - and then in a subsequent call, Gradle does not know how file '.gradle\caches\bundles\release-2026.02.19-1a311a592.zip' was created (output property 'assetBundleCacheDirectory') . Am I missing a step to get Gradle to realize that it's also responsible for the contents of the output directory?Martin
03/07/2026, 9:31 AMMartin
03/07/2026, 9:31 AMtaskProvider.map {
it.outputDir.get().asFile.listFiles()?.singleOrNull() ?: error("foo")
}Remi Gelinas
03/07/2026, 1:15 PMMartin
03/07/2026, 3:44 PM./gradlew -p test-plugin :gr8DefaultDownload
[...]
./gradlew -p test-plugin :gr8DefaultDownload -i
Skipping task ':gr8DefaultDownload' as it is up-to-date.