sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Configuration Cache Incompatibility

Open WebTiger89 opened this issue 1 year ago • 1 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 https://github.com/getsentry/sentry-android-gradle-plugin/issues/554

WebTiger89 avatar Mar 27 '24 16:03 WebTiger89

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.

markushi avatar Apr 03 '24 12:04 markushi