mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 10:57:28 +00:00
Support building with Java 17
Needed to remove ErrorProne and Nullaway compiler plugins Fixes #2136
This commit is contained in:
parent
fc1c7490ed
commit
828940e5a1
7 changed files with 20 additions and 78 deletions
24
build.gradle
24
build.gradle
|
|
@ -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") }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue