Skip to content

Commit

Permalink
Upgrade to Gradle 8
Browse files Browse the repository at this point in the history
Something changing in Gradle 8 or the Groovy compiler they use
required me to separate the AST transformations into layers.

Ultimately should be invisible from the outside (if I did this right).
  • Loading branch information
ajoberstar committed Feb 18, 2024
1 parent f5f9bcc commit 81906f8
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 32 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
14 changes: 11 additions & 3 deletions grgit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ java {
}
}

val transform1 by sourceSets.creating
val transform2 by sourceSets.creating

dependencies {
// groovy
api("org.codehaus.groovy:groovy:[3.0.9, 4.0)")
"transform1Implementation"("org.codehaus.groovy:groovy:[3.0.9, 4.0)")

// jgit
"transform2Implementation"("org.codehaus.groovy:groovy:[3.0.9, 4.0)")
"transform2Implementation"(transform1.output)

api("org.codehaus.groovy:groovy:[3.0.9, 4.0)")
api("org.eclipse.jgit:org.eclipse.jgit:[6.0, 7.0)")
api(transform2.output)
}

testing {
Expand All @@ -48,4 +54,6 @@ tasks.named<Jar>("jar") {
manifest {
attributes.put("Automatic-Module-Name", "org.ajoberstar.grgit")
}
from(transform1.output)
from(transform2.output)
}
21 changes: 12 additions & 9 deletions grgit-core/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ com.googlecode.javaewah:JavaEWAH:1.2.3=compileClasspath,default,runtimeClasspath
commons-codec:commons-codec:1.16.0=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.codehaus.groovy:groovy:3.0.12=testCompileClasspath,testRuntimeClasspath
org.codehaus.groovy:groovy:3.0.19=compileClasspath,default,runtimeClasspath
org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.codehaus.groovy:groovy:3.0.19=default
org.codehaus.groovy:groovy:3.0.20=compileClasspath,runtimeClasspath,transformCompileClasspath,transformRuntimeClasspath
org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r=default
org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest:2.2=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.10.0=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.10.0=testCompileClasspath,testRuntimeClasspath
org.junit:junit-bom:5.10.0=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.10.2=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.10.2=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.10.2=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:1.10.2=testRuntimeClasspath
org.junit:junit-bom:5.10.2=testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:1.7.36=compileClasspath,default,runtimeClasspath
org.slf4j:slf4j-api:2.0.9=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-simple:2.0.9=testRuntimeClasspath
org.slf4j:slf4j-api:2.1.0-alpha1=testCompileClasspath,testRuntimeClasspath
org.slf4j:slf4j-simple:2.1.0-alpha1=testRuntimeClasspath
org.spockframework:spock-core:2.3-groovy-3.0=testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,archives,signatures,testAnnotationProcessor
empty=annotationProcessor,archives,signatures,testAnnotationProcessor,transformAnnotationProcessor
3 changes: 2 additions & 1 deletion grgit-gradle/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ com.googlecode.javaewah:JavaEWAH:1.2.3=compatTestCompileClasspath,compatTestRunt
commons-codec:commons-codec:1.16.0=compatTestCompileClasspath,compatTestRuntimeClasspath,compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=compatTestCompileClasspath
org.codehaus.groovy:groovy:3.0.12=compatTestCompileClasspath,compatTestRuntimeClasspath
org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r=compatTestCompileClasspath,compatTestRuntimeClasspath,compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r=default
org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r=compatTestCompileClasspath,compatTestRuntimeClasspath,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest:2.2=compatTestCompileClasspath,compatTestRuntimeClasspath
org.junit.platform:junit-platform-commons:1.9.0=compatTestCompileClasspath,compatTestRuntimeClasspath
org.junit.platform:junit-platform-engine:1.9.0=compatTestCompileClasspath,compatTestRuntimeClasspath
Expand Down
6 changes: 3 additions & 3 deletions grgit-gradle/stutter.lockfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DO NOT MODIFY: Generated by Stutter plugin.
java11=7.0.2,7.6.3,8.0.2,8.4
java17=7.3.3,7.6.3,8.0.2,8.4
java21=8.4
java11=7.0.2,7.6.4,8.0.2,8.6
java17=7.3.3,7.6.4,8.0.2,8.6
java21=8.4,8.6
10 changes: 5 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pluginManagement {
plugins {
id("org.ajoberstar.defaults.java-library") version "0.17.5"
id("org.ajoberstar.defaults.gradle-plugin") version "0.17.5"
id("org.ajoberstar.defaults.java-library") version "0.17.6"
id("org.ajoberstar.defaults.gradle-plugin") version "0.17.6"

id("org.ajoberstar.reckon.settings") version "0.18.0"
id("org.ajoberstar.stutter") version "0.7.2"
id("org.ajoberstar.reckon.settings") version "0.18.3"
id("org.ajoberstar.stutter") version "1.0.0"

id("com.diffplug.spotless") version "6.22.0"
id("com.diffplug.spotless") version "6.25.0"
}

repositories {
Expand Down

0 comments on commit 81906f8

Please sign in to comment.