This message was deleted.
# configuration-cache
s
This message was deleted.
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Regarding the question, no, you cannot do it. The configuration cache is not yet relocatable and can not yet safely shared like you want it.
This is the issue that should add that capability: https://github.com/gradle/gradle/issues/13510
Currently, you can just check whether you do unneccessary and slow things in the configuration phase. If you for example break task-configuration avoidance, you do much unnecessary work that could be saved.
a
Please do not split topics across several threads.
This makes following the conversation in the threads view very hard as the context of the other messages is missing.
If you have additional information either edit the original message or post to its thread.
yeah sorry, will take care of that. Fixed that as of now
👌 1
https://github.com/gradle/gradle/issues/13510#issuecomment-1015935665 btw, does this method (though hacky) helps to some extent. If both the machines are exactly the same env? For e.g. a docker container?
v
I don't know for sure. Just caching and restoring that directory might not be enough. The official Gradle build GitHub action does some configuration cache caching and restoring, but is only compatible with 8.1 and newer and also has edge cases it seems like only restoring it if the full Gradle user home was restored or something like that. You can have a look at https://github.com/gradle/gradle-build-action/blob/0bfe00a136db5e61ba3416b372542a65863a9fee/src/cache-extract-entries.ts#L344
a
sure, thanks
Also, is there some way to run configuration phase of a task separately than running the entire task?
What I’m trying to think is that if I can’t cache the configuration step, let me run it asynchronously before I run the build command, so that gradle automatically skips the configuration phase when task is run (if the input to configuration remain the same on running build that is)
v
I think if you run with
-m
a.k.a.
--dry-run
you should achieve what you want.
a
right thanks, will check it out
👌 1