Hey folks. I need some basic insight wrt this erro...
# community-support
k
Hey folks. I need some basic insight wrt this error:
Copy code
Dependency constraints can not be declared against the `compileClasspath` configuration.
Any advice would be helpful
v
Which part is unclear? The message sounds pretty explicit to me.
k
It is, but I'm seeing an error relating to migrating code from Gradle 7 to Gradle 8, where dependency constraints were declared against
compileClasspath
. Trying to put the same constraints on
implementation
results in an error relating to dependency locking:
Copy code
Resolved 'foo:bar:1.0' which is not part of the dependency lock state
It is to be noted that there is a dependency substitution rule also in play:
Copy code
configurations.implementation {
  resolutionStrategy.dependencySubstitution {
    substitute(module("foo:bar:1.0")).using(module("foo:baz:1.0"))
  }
}
v
Hm, have no experience with locking, sorry