Skip to content
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

GatherLicenseTask is not compatible with configuration cache #90

Open
DreierF opened this issue Oct 19, 2024 · 1 comment
Open

GatherLicenseTask is not compatible with configuration cache #90

DreierF opened this issue Oct 19, 2024 · 1 comment

Comments

@DreierF
Copy link
Contributor

DreierF commented Oct 19, 2024

The GatherLicenseTask is not compatible with Gradle's configuration cache.

val gatherLicense = tasks.register<com.github.vlsi.gradle.license.GatherLicenseTask>("gatherLicense") {
    configuration(project.configurations.runtimeClasspath)
}

Running it via ./gradlew gatherLicense --configuration-cache --configuration-cache-problems=warn results in:

Configuration cache state could not be cached: field `value` of `kotlin.InitializedLazyImpl` bean found in field `extraDeps$delegate` of task `:ide:cli:gatherLicense` of type `com.github.vlsi.gradle.license.GatherLicenseTask`: error writing value of type 'org.gradle.api.internal.artifacts.configurations.DefaultUnlockedConfiguration'
> Resolving dependency configuration 'gatherLicense_dependencies' is not allowed as it is defined as 'canBeResolved=false'.
  Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'gatherLicense_dependencies' should be resolved.
@alexei-osipov
Copy link

alexei-osipov commented Nov 6, 2024

Also the plugin uses Gradle.addBuildListener API that is also unsupported for configuration cache.

See https://docs.gradle.org/8.10.2/userguide/configuration_cache.html#config_cache:requirements:build_listeners

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

No branches or pull requests

2 participants