From 2a19fea52a75786b42f9fa7c79799eeca708c0c9 Mon Sep 17 00:00:00 2001 From: Mike Rocke Date: Sun, 1 Dec 2024 23:02:19 +0000 Subject: [PATCH] upgrading to java 21 excluding some spotbugs for short term --- build.gradle | 21 +++++++++++++-------- exclude.xml | 6 ++++++ 2 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 exclude.xml diff --git a/build.gradle b/build.gradle index ca9e4f2..fef5d4a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id "java" - id "com.github.spotbugs" version "4.7.3" apply false - id "org.owasp.dependencycheck" version "8.1.2" apply false + id "com.github.spotbugs" version "6.0.26" apply false + id "org.owasp.dependencycheck" version "11.1.0" apply false id "io.github.gradle-nexus.publish-plugin" version "1.1.0" } @@ -24,8 +24,11 @@ subprojects { apply plugin: 'com.github.spotbugs' apply plugin: 'org.owasp.dependencycheck' - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } + } repositories { mavenCentral() @@ -40,8 +43,8 @@ subprojects { 'org.junit.jupiter:junit-jupiter-params:5.9.2', 'org.junit.jupiter:junit-jupiter-engine:5.9.2', 'com.google.guava:guava:31.1-jre', - 'org.mockito:mockito-core:5.1.1', - 'org.mockito:mockito-junit-jupiter:5.1.1', + 'org.mockito:mockito-core:5.14.2', + 'org.mockito:mockito-junit-jupiter:5.14.2', 'org.assertj:assertj-core:3.24.2', 'org.apache.commons:commons-lang3:3.12.0' } @@ -67,7 +70,9 @@ subprojects { } spotbugs { - toolVersion = '4.2.3' + toolVersion = '4.8.6' + excludeFilter = file("${rootDir}/exclude.xml") + reportsDir = file("${rootDir}/spotbugs") } build { @@ -76,7 +81,7 @@ subprojects { checkstyle { configFile = rootProject.file('config/checkstyle/checkstyle.xml') - toolVersion = "8.41.1" + toolVersion = "10.20.2" } jar { diff --git a/exclude.xml b/exclude.xml new file mode 100644 index 0000000..f0bf3e2 --- /dev/null +++ b/exclude.xml @@ -0,0 +1,6 @@ + + + + + +