Skip to content

Disable Gradle configuration cache on unsupported DependencyGuard task #1843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SimonMarquis
Copy link
Contributor

@SimonMarquis SimonMarquis commented Mar 18, 2025

Prevent Gradle Configuration Cache issue with Dependency Guard:

https://github.com/android/nowinandroid/actions/runs/13933394498/job/38995815537

Configuration cache state could not be cached: field `__monitoredConfigurationsMap__` of task `:app:dependencyGuard` of type `com.dropbox.gradle.plugins.dependencyguard.internal.list.DependencyGuardListTask`: error writing value of type 'org.gradle.api.internal.provider.DefaultMapProperty'

https://github.com/dropbox/dependency-guard/blob/4eb2c28c1c1ccd5d8884eb7bb79a07e7a1cf3c7c/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/list/DependencyGuardListTask.kt#L68

@SimonMarquis
Copy link
Contributor Author

SimonMarquis commented Mar 18, 2025

Another way to fix this could be to explicitly disable configuration cache for the corresponding task type, but this would require a bit more changes. Let me know what you prefer.

@SimonMarquis
Copy link
Contributor Author

That being said, it would be great to still be able to use configuration cache for this task, because most of the time, it will remain UP-TO-DATE.
I can report the issue on the DependencyGuard plugin if necessary, but I don't think this plugin is still in active development. Maybe it would be the time to migrate to Gradle's builtin dependency locking mechanism 😏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant