diff --git a/grgit-core/build.gradle.kts b/grgit-core/build.gradle.kts index 41957e30..6ba3eec1 100644 --- a/grgit-core/build.gradle.kts +++ b/grgit-core/build.gradle.kts @@ -4,9 +4,15 @@ plugins { id("org.gradle.test-retry") } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } +} + dependencies { // groovy - compileOnly("org.codehaus.groovy:groovy:[3.0, 4.0)") + api("org.codehaus.groovy:groovy:[3.0.9, 4.0)") // jgit api("org.eclipse.jgit:org.eclipse.jgit:[6.0, 7.0)") @@ -18,6 +24,7 @@ testing { useSpock("2.0-groovy-3.0") dependencies { + implementation("org.codehaus.groovy:groovy:[3.0.9, 4.0)") implementation("org.junit.jupiter:junit-jupiter-api:latest.release") // logging diff --git a/grgit-core/gradle.lockfile b/grgit-core/gradle.lockfile index cce7b32c..2ecc3262 100644 --- a/grgit-core/gradle.lockfile +++ b/grgit-core/gradle.lockfile @@ -6,8 +6,7 @@ com.googlecode.javaewah:JavaEWAH:1.1.13=compileClasspath,runtimeClasspath,testCo net.bytebuddy:byte-buddy:1.11.0=testCompileClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.assertj:assertj-core:3.20.2=testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy:3.0.8=testCompileClasspath,testRuntimeClasspath -org.codehaus.groovy:groovy:3.0.9=compileClasspath +org.codehaus.groovy:groovy:3.0.9=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=testCompileClasspath,testRuntimeClasspath org.jetbrains:annotations:20.1.0=testCompileClasspath,testRuntimeClasspath diff --git a/grgit-gradle/build.gradle.kts b/grgit-gradle/build.gradle.kts index 1c4de260..49769604 100644 --- a/grgit-gradle/build.gradle.kts +++ b/grgit-gradle/build.gradle.kts @@ -5,23 +5,16 @@ plugins { id("org.ajoberstar.stutter") } -// avoid conflict with localGroovy() -configurations.configureEach { - exclude(group = "org.codehaus.groovy") -} - -// compat tests use grgit to set up and verify the tests -sourceSets { - compatTest { - compileClasspath += sourceSets["main"].output - runtimeClasspath += sourceSets["main"].output +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) } } dependencies { - compileOnly(gradleApi()) - - api(project(":grgit-core")) + api(project(":grgit-core")) { + exclude(group = "org.codehaus.groovy") + } compatTestImplementation(project(":grgit-core")) compatTestImplementation("org.spockframework:spock-core:2.0-groovy-3.0") diff --git a/grgit-gradle/gradle.lockfile b/grgit-gradle/gradle.lockfile index e1793757..e9fcc234 100644 --- a/grgit-gradle/gradle.lockfile +++ b/grgit-gradle/gradle.lockfile @@ -6,6 +6,7 @@ com.googlecode.javaewah:JavaEWAH:1.1.13=compatTestCompileClasspath,compatTestRun net.bytebuddy:byte-buddy:1.11.0=compatTestCompileClasspath,compatTestRuntimeClasspath org.apiguardian:apiguardian-api:1.1.0=compatTestCompileClasspath,compatTestRuntimeClasspath org.assertj:assertj-core:3.16.1=compatTestCompileClasspath,compatTestRuntimeClasspath +org.codehaus.groovy:groovy:3.0.9=compatTestCompileClasspath,compatTestRuntimeClasspath org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r=compatTestCompileClasspath,compatTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hamcrest:hamcrest:2.2=compatTestCompileClasspath,compatTestRuntimeClasspath org.jetbrains:annotations:20.1.0=compatTestCompileClasspath,compatTestRuntimeClasspath