Configuration Cache Incompatibility
WebTiger89 opened this issue · comments
Gradle Version
8.7
AGP Version
8.4.0-beta01
Code Minifier/Optimizer
None
Version
4.4.0
Sentry SDK Version
7.6.0
Steps to Reproduce
Enable gradle configuration cache
Expected Result
Build succeed instead of failing
Actual Result
When trying to build my app module via terminal the build fails with error:
Configuration cache state could not be cached: field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `__sourceDirs__` of task `:myapp:generateSentryBundleIdMinApi29Debug` of type `io.sentry.android.gradle.sourcecontext.GenerateBundleIdTask`: error writing value of type 'org.gradle.api.internal.provider.BiProvider'
> Querying the mapped value of property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, map(org.gradle.api.file.Directory flatmap(provider(task 'generateMinApi29DebugBuildConfig', class com.android.build.gradle.tasks.GenerateBuildConfig)) check-type())))) before task ':myapp:generateMinApi29DebugBuildConfig' has completed is not supported
Using --no-configuration-cache works.
See issue #554
The underlying issue seems to be that we want to package the BuildConfig
, before it's even created. Let's have a closer look and check if maybe even should exclude the BuildConfig
class.
hey @WebTiger89 the issue has been addressed in the version 4.6.0, which just has been published. Please give it a try and let us know. Thank you!