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
Fix compile error in build.gradle.kts on Gradle 7.6 #686
Comments
Investigating the versions, it looks like for a while even the experimental build only used Gradle 7.5.1 (i.e. a released version) and there it worked. The first failure I could find is on 7.6-rc-2. There seems to be no build with 7.6-rc-1. On 7.5 this worked: val demoTests by registering(JvmTestSuite::class) {
dependencies {
implementation(project)
implementation("com.google.jimfs:jimfs:1.2")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("org.assertj:assertj-core:3.22.0")
}
// ...
} The issue is that |
You should be able to use |
I've pushed #687 which provides more standard syntax (with the caveat that I don't have experience with Kotlin, but it's what I'd do in groovy!) |
The `JvmComponentDependencies` changed: * [Before (7.5.1)](https://github.com/gradle/gradle/blob/v7.5.1/subprojects/plugins/src/main/java/org/gradle/api/plugins/jvm/JvmComponentDependencies.java#L46) * [After (7.6.0-RC3)](https://github.com/gradle/gradle/blob/v7.6.0-RC3/subprojects/plugins/src/main/java/org/gradle/api/plugins/jvm/JvmComponentDependencies.java#L48) Closes: #686 PR: #687
While you cannot use |
Thank you @carterkozak! 🙏🏾 I just pulled @jvandort That looks like the cleaner syntax but it only works on Gradle 7.6, not on 7.5 yet and we need to build on both. (Because the "real" builds run with 7.5 and experimental ones with 7.6 to preview problems like these.) We can switch to the cleaner |
Using
|
The build file (
build.gradle.kts
) does not compile on Gradle 7.6-rc-3:See, e.g., this build.
The text was updated successfully, but these errors were encountered: