From e881d586f64eb2664ecdb22637425caffdf8870e Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Mon, 17 Jul 2023 09:28:38 -0600 Subject: [PATCH] Set Java compile version to 17 Signed-off-by: Taylor Smock --- .classpath | 2 +- .github/workflows/ant.yml | 1 + build.gradle | 6 +++--- build.xml | 1 + gradle.properties | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.classpath b/.classpath index f347d6e..04b10ef 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 59d8d64..9a1dc48 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -21,6 +21,7 @@ jobs: josm-revision: ["", "r18589"] uses: JOSM/JOSMPluginAction/.github/workflows/ant.yml@v1 with: + java-version: 17 josm-revision: ${{ matrix.josm-revision }} plugin-jar-name: 'mapwithai' perform-revision-tagging: ${{ github.repository == 'JOSM/MapWithAI' && github.ref_type == 'branch' && github.ref_name == 'master' && github.event_name != 'schedule' && github.event_name != 'pull_request' && matrix.josm-revision == 'r18589' }} diff --git a/build.gradle b/build.gradle index 9d02ea8..6bf9a4c 100644 --- a/build.gradle +++ b/build.gradle @@ -30,8 +30,7 @@ repositories { def versions = [ awaitility: "4.2.0", equalsverifier: "3.15", - // Errorprone 2.11 requires Java 11+ - errorprone: (JavaVersion.toVersion(getJavaVersion()) >= JavaVersion.VERSION_11) ? "2.20.0" : "2.10.0", + errorprone: "2.20.0", findsecbugs: "1.12.0", jacoco: "0.8.7", jmockit: "1.49.a", @@ -77,7 +76,7 @@ int getJavaVersion() { if (ci) { return Integer.valueOf(JavaVersion.current().getMajorVersion()) } - return 8 + return 17 } logger.lifecycle("Using Java " + getJavaVersion()) @@ -212,6 +211,7 @@ spotless { josm { debugPort = 7055 manifest { + setMinJavaVersion 17 oldVersionDownloadLink 18218, "v1.9.20", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.9.20/mapwithai.jar") oldVersionDownloadLink 17903, "v1.8.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.8.7/mapwithai.jar") oldVersionDownloadLink 17084, "v1.7.1.6", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.7.1.6/mapwithai.jar") diff --git a/build.xml b/build.xml index 96efe32..1f1f15e 100644 --- a/build.xml +++ b/build.xml @@ -6,6 +6,7 @@ + diff --git a/gradle.properties b/gradle.properties index f2948c2..f38a2c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,7 @@ plugin.author = Taylor Smock plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin plugin.icon = images/dialogs/mapwithai.svg plugin.link = https://github.com/JOSM/MapWithAI +plugin.minimum.java.version = 17 plugin.description = Allows the use of MapWithAI data in JOSM (same data as used in RapiD) plugin.requires = utilsplugin2;apache-http