Slackbot
12/17/2023, 8:38 PMJavi
12/17/2023, 8:45 PM.gradle directoryRobert Elliot
12/17/2023, 8:45 PMRobert Elliot
12/17/2023, 8:47 PM.gradle dir in a cache mount as well.Javi
12/17/2023, 8:47 PMJavi
12/17/2023, 8:47 PMRobert Elliot
12/17/2023, 8:50 PMPhilip W
12/17/2023, 9:11 PMVampire
12/17/2023, 10:29 PMI would love to create the configuration cache without running the tasks itself
Does
--dry-run not help? Or is its value a CC input aswell?Philip W
12/17/2023, 10:33 PMRobert Elliot
12/17/2023, 11:23 PM./gradlew build --dry-run also downloads all the necessary to do that build offline? Does that sound correct?Vampire
12/18/2023, 8:36 AM--dry-run without CC wouldn't download anything except things needed at configuration time for whatever reason - most probably bad practice.
With CC enabled, providers and configurations and so on are resolved at the time the CC entry is stored, so files that are inputs of tasks most probably are downloaded with --dry-run and CC.
But things that are only downloaded at execution time only, are still not there unless you execute that code path.Robert Elliot
12/18/2023, 8:49 AMVampire
12/18/2023, 8:52 AMRobert Elliot
12/18/2023, 8:53 AMRobert Elliot
12/18/2023, 9:22 AMbuild directory cached... but if I cache the build directory is there any point caching ~/.gradle/caches/build-cache-1? Or indeed using the build cache at all?
It may be better to be compiling from scratch in CI anyway...Robert Elliot
12/18/2023, 9:44 AMEric Haag
12/19/2023, 1:11 PMIt should be great if the Gradle Build Action behavior would be explained with detail for those customers that are not in GitHub and have to copy it
The Gradle Build Action caching behavior is well documented quite well. Do you feel something is missing? https://github.com/gradle/gradle-build-action?tab=readme-ov-file#how-gradle-user-home-caching-works
Javi
12/19/2023, 1:20 PMVampire
12/19/2023, 1:49 PMRobert Elliot
12/23/2023, 9:55 AMif you have included build you will have to add them tooSo I see... if I have this setup:
/parent-project
/child-project-1
/child-project-2
I need to cache
/parent-project/.gradle
/parent-project/child-project-1/.gradle
/parent-project/child-project-2/.gradle
and remember to alter the cache directives in the Dockerfile when I add child-project-3 😢
I've solved this for the build directories by writing a plugin that copies the build dirs into /parent-project/build/sub-projects/<tree_structure> so I can reference them all with a single Dockerfile COPY. Is it possible to configure the location of the configuration-cache?Vampire
12/23/2023, 10:43 AM.gradle using org.gradle.projectcachedirRobert Elliot
12/23/2023, 12:34 PM