-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle properties not used at configuration time can still invalidate configuration cache #20969
Open
Tracked by
#28341
Labels
Comments
copybara-service bot
pushed a commit
to androidx/androidx
that referenced
this issue
Jun 9, 2022
…radle property so that it doesn't invalidate the configuration cache. Also adding exemptions for tasks that start rerunning when using the configuration cache, see https://youtrack.jetbrains.com/issue/KT-49933 Bug: b/234451189 Bug: gradle/gradle#20969 Test: ./gradlew :help -Pandroidx.verifyUpToDate # and see that this still fails Test: /gradlew :annotation:annotation:assemble -Pandroidx.verifyUpToDate # and see that the second build says "Configuration cache entry reused" Test: rm -rf ../../out/dist && DIST_DIR=../../out/dist ./gradlew :annotation:annotation:assemble -Pandroidx.verifyUpToDate && ls ../../out/dist/scan* # and see that the scan zips exist Change-Id: I8e89462e8bed8006d835dd4bd11a69eb7f45a932
Sorry for the late reply. Thank you for providing a valid report. The issue is in the backlog of the relevant team, but this area of Gradle is currently not a focus one, so it might take a while before a fix is made. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
It would be helpful if changes to unused Gradle properties didn't invalidate the configuration cache
Current Behavior
In AndroidX we're finding that changes to Gradle properties that aren't used at configuration time can still invalidate the configuration cache.
Also interesting, we're finding that Gradle properties that aren't used at all can still invalidate the configuration cache ( repro at https://github.com/mathjeff/gradle-samples/tree/master/configuration-cache-unused-property )
Context
We have a feature ( #13753 ) that changes some properties of some Gradle tasks, and we'd like it to be possible to avoid reconfiguring all projects and instead to just reread the new property value during task execution.
This issue looks closely related to #20873 ; if there were a convenient way to exempt a specific Gradle property from invalidating the configuration cache, that would work too.
In the meanwhile we might end up switching from a gradle property to an environment variable, which appears to not invalidate the configuration cache, see https://android-review.googlesource.com/c/platform/frameworks/support/+/2120272
The text was updated successfully, but these errors were encountered: