Skip to content

Commit

Permalink
Update Gradle to support Java 22
Browse files Browse the repository at this point in the history
  • Loading branch information
osiegmar committed Jun 3, 2024
1 parent 3f61dcc commit 0487529
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 5 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ repositories {
}

dependencies {
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.1")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.15")
}

kotlin {
jvmToolchain(21)
}
8 changes: 2 additions & 6 deletions buildSrc/src/main/kotlin/fastcsv.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ tasks.withType<com.github.spotbugs.snom.SpotBugsTask>().configureEach {
reports.maybeCreate("html").required = true
}

// Need to add this as PMD 7 (required for Java21) is not yet released
dependencies {
pmd("net.sourceforge.pmd:pmd-ant:7.0.0-rc4")
pmd("net.sourceforge.pmd:pmd-java:7.0.0-rc4")
}

pmd {
// Version bundled with Gradle 8.8 is not able to run on Java 22.
toolVersion = "7.2.0"
isConsoleOutput = true
ruleSets = emptyList()
ruleSetFiles = files("${project.rootDir}/config/pmd/config.xml")
Expand Down
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-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
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

0 comments on commit 0487529

Please sign in to comment.