-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
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