Support building with Java 17
Some checks failed
Java CI with Maven / build (17) (push) Successful in 1m50s
Java CI with Gradle / build (17) (push) Failing after 1m59s

Needed to remove ErrorProne and Nullaway compiler plugins

Fixes #2136
This commit is contained in:
Dave Syer 2025-11-26 10:38:36 +00:00
parent fc1c7490ed
commit 828940e5a1
7 changed files with 20 additions and 78 deletions

View file

@ -7,7 +7,6 @@ plugins {
id 'org.cyclonedx.bom' version '3.0.2'
id 'io.spring.javaformat' version '0.0.47'
id "io.spring.nohttp" version "0.0.11"
id 'net.ltgt.errorprone' version '4.3.0'
}
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
@ -17,7 +16,7 @@ version = '4.0.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(17)
}
}
@ -30,14 +29,12 @@ ext.springJavaformatCheckstyleVersion = "0.0.47"
ext.webjarsLocatorLiteVersion = "1.1.2"
ext.webjarsFontawesomeVersion = "4.7.0"
ext.webjarsBootstrapVersion = "5.3.8"
ext.errorProneVersion = "2.42.0"
ext.nullAwayVersion = "0.12.10"
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'javax.cache:cache-api'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
@ -59,8 +56,6 @@ dependencies {
testImplementation 'org.testcontainers:testcontainers-mysql'
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${springJavaformatCheckstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
errorprone "com.google.errorprone:error_prone_core:${errorProneVersion}"
errorprone "com.uber.nullaway:nullaway:${nullAwayVersion}"
}
tasks.named('test') {
@ -77,21 +72,6 @@ checkstyleNohttp {
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
}
tasks.withType(JavaCompile).configureEach {
options.release = 17
options.errorprone {
disableAllChecks = true
}
if (name.equals("compileJava")) {
options.errorprone {
error("NullAway")
option("NullAway:OnlyNullMarked", "true")
option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract")
option("NullAway:JSpecifyMode", "true")
}
}
}
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") }