gradle plugin not resolving dependencies properly
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 217
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
# libs.versions.toml
dgs-codegen = { id = "com.netflix.dgs.codegen", version = "6.+" }
// build.gradle.kts
buildscript { dependencyLocking { lockAllConfigurations() } }
plugins {
`java-library`
alias(libs.plugins.dgs.codegen)
}
dependencyLocking {
lockAllConfigurations()
}
tasks.withType<GenerateJavaTask>().configureEach {
packageName = "com.xenoterracide.controller.registration"
language = "java"
}
Configuration cache state could not be cached: field `classpath` of task `:controller-registration:compileJava` of type `org.gradle.api.tasks.compile.JavaCompile`: error writing value of type 'org.gradle.api.internal.artifacts.configurations.DefaultUnlockedConfiguration'
> Could not resolve all files for configuration ':controller-registration:compileClasspath'.
> Resolved 'org.jetbrains:annotations:13.0' which is not part of the dependency lock state
> Resolved 'org.jetbrains.kotlin:kotlin-stdlib:1.9.24' which is not part of the dependency lock state
> Resolved 'com.netflix.graphql.dgs:graphql-dgs-platform:5.5.1' which is not part of the dependency lock state
> Resolved 'com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:5.5.1' which is not part of the dependency lock state
calling dependencies --write-locks (with some output filters
+--- com.graphql-java:graphql-java:19.2 FAILED
| +--- com.graphql-java:graphql-java:19.2 FAILED
| +--- com.graphql-java:graphql-java:22.0 FAILED
| +--- com.graphql-java:graphql-java:22.1 FAILED
| +--- com.graphql-java:graphql-java:{prefer 18.3} FAILED
| | +--- com.graphql-java:graphql-java:{strictly [19.2, 20[; prefer 19.2; reject 18.2} FAILED
+--- com.netflix.graphql.dgs:graphql-dgs-platform FAILED
I tried adding things like com.netflix.graphql.dgs:graphql-dgs-platform:5.5.1 to implementation but that didn't fix it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report from libs.versions.toml and build.gradle.kts, starting with dependencyLocking and the dgs.codegen plugin alias. Run dependencies --write-locks and inspect the reported FAILED GraphQL DGS resolutions. Done means the plugin dependencies resolve into the lock state and the configuration cache no longer reports the compileClasspath failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100