Open paul-turner opened 2 years ago
Hi @paul-turner, thank you for the report. We are taking support for the configuration cache under advisement and are tracking internally as 13139839.
However please note that the Gradle docs you linked contain the warning:
This feature is currently highly experimental and not enabled by default. Not all core Gradle plugins are supported. Your build and the plugins you depend on might require changes to fulfil the requirements. Some Gradle features are not yet implemented. Importing and syncing Gradle builds in IDEs is not improved by configuration caching yet
Hi @joakley-msft - That is a notice, not a warning. Configuration caching is fairly close to being the default, community plugins should be actively implementing support for it and I'd point out that intune's SDK is actually our last remaining plugin that hasn't implemented support yet. We actively have to isolate the plugin currently to CI only so as to limit its negative influence on local build times.
Yep sorry about that, I used the bug template out of convenience and should have updated the wording a bit. Any updates on development would be appreciated and as Zac mentions we are quickly approaching a time where configuration cache will become a norm in Android development.
Hey @joakley-msft, any updates on supporting configuration cache for mam plugin?
@SageEx No ETA to share at this time, but we are still actively tracking this work.
Describe the bug: When running a build with Gradle's configuration cache turned on the build will fail to apply the config cache due to the plugins usage of disallowed types.
To Reproduce Reproduced this in the Taskr sample app after upgrading the gradle version to 7.1.0. Steps to reproduce the behavior:
./gradlew --configuration-cache assembleDebug
Expected behavior: Configuration cache should complete without discarding the cache entry.
Screenshots and logs:
FAILURE: Build failed with an exception.
1 problem was found storing the configuration cache.
:app:transformClassesWithMamifyTransformForDebug
of typecom.android.build.gradle.internal.pipeline.TransformTask
: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache. See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:disallowed_typesSee the complete report at file:///Users/pturner/nobackup/dev/Taskr-Sample-Intune-Android-App/build/reports/configuration-cache/2uonhwsi4i9jxufawmqjk3jip/65zgg7rd3oinrrk83jd5vsdqh/configuration-cache-report.html
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 765ms 28 actionable tasks: 28 up-to-date Configuration cache entry discarded with 1 problem.