-
Notifications
You must be signed in to change notification settings - Fork 434
Use of project property as opt-in toggle for build caching of scripts is cumbersome in practice #1032
Comments
If we do change this, also need to update here: https://github.com/gradle/gradle/blob/4d620bab0fdecbc990ebc8c02775ea230578d06a/subprojects/core/src/main/java/org/gradle/internal/scan/config/BuildScanPluginCompatibility.java#L69 |
The following in a org.gradle.project.org.gradle.kotlin.dsl.caching.buildcache=true |
@eskatos if you can turn that It's a bit cumbersome in its length, but the mechanics are right. |
@ldaley it doesn't work because the property is checked on This needs to be fixed. |
We should not make that flag a public build option. Its purpose is to test drive script compilation caching during the RC phase. The plan is to get rid of it and simply tie enabling script compilation caching to enabling the build cache. Making it a project property means one could enable/disable it per project, which is not the desired behavior. Moreover, the script compilation build cache service is build scoped and doesn't have enough context to honor the flag on each invocation. I think that using a system property instead would better capture the intent. I confirmed that it can also be set in a systemProp.org.gradle.kotlin.dsl.caching.buildcache=true and is then available when we need it to setup the script compilation cache. @bamboo wdyt? |
The property was modelled after the
@eskatos It seems more consistent with |
IIUC |
… project property And prove it can be enabled via `$GRADLE_HOME/gradle.properties`. See #1032
Follow up PR gradle/gradle#6378 has been merged |
Expected Behavior
A convenient and idiomatic way to opt-in to this functionality on a per user or per project basis.
Current Behavior
I can either explicitly add the project property to the invocation, which is cumbersome, or use some obtuse
ORG_GRADLE_PROJECT_org.gradle.kotlin.dsl.caching.buildcache=true
env var.I should have the same options for enabling this as I do for build cache (probably minus the first class invocation option). That is, I should be able to put something in my «GRADLE_USER_HOME»/gradle.properties or the same file in the project root, as I can with
org.gradle.caching
.The text was updated successfully, but these errors were encountered: