proguard
proguard copied to clipboard
ProguardTask is incompatible with the configuration cache
See https://docs.gradle.org/7.5-rc-1/userguide/configuration_cache.html
Running an instance of ProguardTask with the configuration cache on results in a failure. For example:
$ ./gradlew :mdx:minify --configuration-cache
* What went wrong:
Configuration cache problems found in this build.
4 problems were found storing the configuration cache, 1 of which seems unique.
- Task `:mdx:minify` of type `proguard.gradle.ProGuardTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/7.5-rc-1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
See the complete report at file:///.../build/reports/configuration-cache/4vg2suoj0m28s61f63oq9jfjf/7ofh75cdtqvk23hhkaw5evrfh/configuration-cache-report.html
> Invocation of 'Task.project' by task ':mdx:minify' at execution time is unsupported.
And here are the usages, extracted from the stacktraces in the HTML report:
at proguard.gradle.ProGuardTask.extendClassPath(ProGuardTask.java:1591)at proguard.gradle.ProGuardTask.getConfiguration(ProGuardTask.java:1486)
These usages are basically
ConfigurableFileCollection fileCollection = getProject().files(files)
Where it is getProject() that is "illegal" to call, at execution time, with configuration cache on.
I am open to PRing a fix for this, but I wanted to open an issue first to see what the appetite would be for an external contribution.
Hi @autonomousapps ! Thanks for the report. We'd be very happy to accept a PR that fixes this!
@mrjameshamilton have you had a chance to take a look at the PR I filed 11 days ago?
It seems this was released. Which version was it included in? (Looks like 7.3.0) Can this issue be closed?
Hi @runningcode ! #258 doesn't add support for configuration cache, it simply marks the task with notCompatibleWithConfigurationCache. So the issue is not really fully solved yet.