From 7bdadfb072d2bdd458e21cac2d2f541cc9bde762 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Thu, 19 Oct 2023 15:13:30 -0700 Subject: [PATCH 1/3] Bump to Java 17 - build UAA with Java 17 (bumped from Java 11) - fails with error if built with Java version lower than 17 [#186054019] --- build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 6468f50dd3c..2980f95398f 100644 --- a/build.gradle +++ b/build.gradle @@ -81,8 +81,8 @@ subprojects { [compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none", "-nowarn"] - sourceCompatibility = 1.11 - targetCompatibility = 1.11 + sourceCompatibility = 1.17 + targetCompatibility = 1.17 test { maxParallelForks = 1 @@ -159,8 +159,8 @@ cargo { containerId = "tomcat9x" port = applicationPort - if (JavaVersion.current() < JavaVersion.VERSION_11) { - throw new GradleException("This build must be run with Java version [ " + JavaVersion.VERSION_11 + " ] or greater. Your Java version is [ " + JavaVersion.current() + " ]") + if (JavaVersion.current() < JavaVersion.VERSION_17) { + throw new GradleException("This build must be run with Java version [ " + JavaVersion.VERSION_17 + " ] or greater. Your Java version is [ " + JavaVersion.current() + " ]") } deployable { From 606509690b2c45267567b829b0db3ee6701006b2 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Thu, 19 Oct 2023 15:18:39 -0700 Subject: [PATCH 2/3] Remove unnecessary test on GitHub Actions - Remove Java 11 test on GitHub Actions as UAA will no longer be built with Java 11 after this PR [#186054019] --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 535ccd1a94e..f60b7825ccb 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ develop ] -# Run job on CF landscape, e.g. ubuntu 1804 and bellsoft java 11 +# Run job on CF landscape, e.g. ubuntu 1804 and bellsoft java 17 permissions: contents: read @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - java: [ '11', '17' ] + java: [ '17' ] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 From 9269b6426539257466d191e5fd656befb02420d1 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Fri, 20 Oct 2023 01:11:09 -0700 Subject: [PATCH 3/3] refactor: use constants - to be more consistent with other places in this file that uses constants to represent Java versions. [#186054019] --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2980f95398f..b2f42e3e345 100644 --- a/build.gradle +++ b/build.gradle @@ -81,8 +81,8 @@ subprojects { [compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:none", "-nowarn"] - sourceCompatibility = 1.17 - targetCompatibility = 1.17 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 test { maxParallelForks = 1