Matthew Inger
09/25/2024, 5:28 PMMatthew Inger
09/25/2024, 5:28 PMGiuseppe Barbieri
09/26/2024, 10:02 AMArve Seljebu
10/03/2024, 7:35 PM--no-configuration-cache, the application gets the updated value.
It’s reproducable from shell and IntelliJ and on other peoples machines, but not in a minimal viable example.
Example in shell
export SOME_ENV=a_value
./gradlew :project:run
# ctrl + c
export SOME_ENV=new_value
./gradlew :project:run # application gets SOME_ENV == a_value, both from System.getEnv and ktor environment.config.peroperty (HOCON)
In IntelliJ I edit environment variables in run-configuration and start. Same behaviour.
Can mention that when using debug mode in IntelliJ, it does break at a break-point in buildSrc when configuration cache is reused. But if I add --no-configuration-cache to the run-configuration, it breaks every time.
Have tried -Dorg.gradle.caching.debug=true, but could not see anything interesting.Nikolay
10/07/2024, 8:59 PMDavid Ignjić
12/04/2024, 12:37 PMonlyIf(task.project.tasks.getByName('compileJava').state.skipped)Eug
12/06/2024, 5:19 PMEug
12/06/2024, 5:28 PMremoveUnusedEntriesAfterDays - let's say I have library that not often updated, that means cache is removed after specified days and it will be missed on the next run. I wonder if for different projects we could set a different removal number of days.Jendrik Johannes
12/12/2024, 11:17 AM@Incremental tasks do:
• When the task first runs, I store a hash of the output somewhere
◦ Here I may also do some filtering if required for selected tools to cater for (3)
• Before I actually extract the Zip, I hash the existing output folder and check if the hash has changed. Only when it changed I clear the output and re-extract.
My question:
• I am hoping to reuse an existing Gradle Service for the solution I sketched – even though it is internal API. I am looking at ChecksumService , but that's for single files. Is there something I can use out-of-the-box to process the whole destination directory? @wolfs maybe you have a pointer for me?
• Any alternative ideas?Sergii Pechenizkyi
01/15/2025, 11:27 AMНиколай Клебан
01/28/2025, 10:06 PMgc.properties as mentioned there.
I want to be able to give ability to my jobs cleanup cache from time to time and as far as I understand - gc.properties is a part that makes it possible.Andrzej Zabost
02/24/2025, 2:53 PMmap() works, which returns another Provider?Jendrik Johannes
02/26/2025, 7:34 AMThe build cache configuration of the root build differs from the build cache configuration of the early evaluated ':plugins' included build. It is recommended to keep them consistent, see here.
when using
pluginManagement {
includeBuild("gradle/plugins")
}
On the documentation page it only say:
> NOTE: This configuration precedence does not apply to plugin builds included through pluginManagement as these are loaded before the cache configuration itself.
But not what I can do. Should I duplicate the build cache configuration? E.g. in these two places:
• gradle/plugins/setting.gradle.kts
• gradle/plugins/src/main/kotlin/build-cache.setting.gradle.kts (to be applied in settings.gradle.kts in roo)
Or is there another/better solution?Kentaro Doi
03/07/2025, 7:24 AMWojciech Zięba
03/26/2025, 10:37 AMbuild directories) so it took everything from remote build cache (except 1 task). It lasted 2m 3s. From my local experiments I know that clean build without remote build cache takes around 3m. Sum of avoidances is 14m 49s, but is there a way to get the clock-time difference of build (~1m) from build scan?Rohit Krishnan
04/24/2025, 9:01 PM~/.gradle/cache, it ends up skipping tests when running ./gradlew testDevDebugUnitTest for an Android project (even though I did make changes to one of the gradle modules). The folders i'm caching are 8.10.2, build-cache-1, jars-9, and modules-2. Is this the expected behavior when caching this across runs on Github? (It's the same task and the same CI runner).
Looking at logs, it says Task :features:nameOfFeature:testDevDebugUnitTest FROM-CACHE .Vampire
04/30/2025, 3:10 PMallprojects { tasks.all {} }
tasks.register('foo') {
doLast {
allprojects*.tasks*.all { task ->
outputs.files.files.findAll { it.absolutePath.contains('.github') }.each {
println("FOO: ${task.name} | ${it.absolutePath}")
}
}
}
}
And the result even for the GHA run is exactly as expected: https://ge.spockframework.org/s/vnf6tebn2ygd4/console-log?page=1#L100
No overlap with any output of any other task in the whole build.Rohit Krishnan
05/01/2025, 12:53 AMbeforeSettings {
caches {
releasedWrappers.setRemoveUnusedEntriesAfterDays(45)
snapshotWrappers.setRemoveUnusedEntriesAfterDays(10)
downloadedResources.setRemoveUnusedEntriesAfterDays(45)
createdResources.setRemoveUnusedEntriesAfterDays(10)
buildCache.setRemoveUnusedEntriesAfterDays(5)
}
}
However when I set those values to 0 days (so I can clean up anything before the current session), it errors saying I should use the setRemoveUnusedEntriesOlderThan API. Is there any example or documentation on using this new method? It doesn't seem to resolve in my 8.10.2 version of Gradle.Josiah Chan
05/16/2025, 7:05 PMEug
06/06/2025, 8:19 AMCalculating task graph as configuration cache cannot be reused because a build logic input of type 'ProcessResultValueSource' has changed.Rohith S Moolya
06/19/2025, 9:26 AM./gradlew assembleDebug, but I keep running into a Gradle failure related to dependency resolution.
The error occurs during the :app:checkDebugAarMetadata task and says that it can’t find any version of com.facebook.react:react-native. Here’s the relevant part of the logs:
> Task :app:checkDebugAarMetadata FAILED
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.
Searched in the following locations:
-
<https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/maven-metadata.xml>
- <https://repo.maven.apache.org/maven2/com/facebook/react/react-native/maven-metadata.xml>
- <https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom>
- <https://www.jitpack.io/com/facebook/react/react-native/maven-metadata.xml>
- <https://maven.google.com/com/facebook/react/react-native/maven-metadata.xml>
- file:/path/to/node_modules/react-native/android/com/facebook/react/react-native/maven-metadata.xml
- file:/path/to/node_modules/jsc-android/dist/com/facebook/react/react-native/maven-metadata.xml
Has anyone faced this before? I'm wondering if this might be related to using + in the dependency version or a missing local Maven repo. Appreciate any suggestions! 🙏Oleg Nenashev
06/23/2025, 7:00 PMJeanderson Barros Cândido
07/21/2025, 8:36 AMOleg Nenashev
07/23/2025, 5:37 PMCharles Durham
10/08/2025, 11:19 PMEug
10/15/2025, 10:12 AMCharles Durham
10/15/2025, 4:57 PMkyle
10/28/2025, 8:08 PMgenerated/com/acme/_generated exclusively.
Task B's writes to a dynamic list of output directories like generated/com/... and generated/foo/.... But when the output contains generated/com, we have a conflict with Task A and caching is disabled due to overlapping outputs.
What I'd like to do is configure outputs for Task B to say it outputs to generated/com/... excluding generated/com/acme/_generated ... I doubt this is possible though.
Any ideas?Eug
12/11/2025, 7:58 PMJendrik Johannes
02/16/2026, 12:29 PMFileSystemAccess for snapshotting. Last week we noticed that it takes 16m on one developers Windows machine (8m on my AWS Workspace) to do the snapshot of a particular tool. Turns out, the tool consists of 16k files.
So this is probably a general Gradle snapshotting question/issue for cases where you have an insane ammout of files:
One developer spiked to replace what Gradle is doing with a (simple) custom solution based on what they did in their previous custom build system. It's not really usable as it naively snapshots each file directly and does not make any use of the "snapshot caching" and VFS of Gradle which breaks the UP-TO-DATE case. But what they did is using Files.walk(rootPath).parallel()... to process files in parallel, which significantly improved the snapshot creation (first use case) for the 16k files. If I read the Gradle code correctly, files are always processed sequentially (see DirectorySnapshotter). I wonder if there is a particular reason for not using some parallism here.
I could not find anything on this topic in the GH issues. I wonder if this ever came up before and if there are any thoughts on this. We are in a situation where it is hard for (certain) developers to understand why the new system is better than the old one if it appears so much slower. It is of course much better in the incremental case, but the "first use" case is what makes a bad impression on some. (I personally also think it is crazy that we have a "tool" consisting of 16k files - but legacy...)