From db693e83917f45a3ac409876e337ba4b11284480 Mon Sep 17 00:00:00 2001 From: Hussain Kara Fallah <35973295+hussainkarafallah@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:49:03 +0300 Subject: [PATCH] Add Java17 container to build job in GHA (#207) --- .github/workflows/build.yml | 2 ++ build.common.gradle | 20 +++----------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef0ff042..ad9ada2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,6 +125,8 @@ jobs: build: name: "Build and Test" + container: + image: azul/zulu-openjdk:17 runs-on: - ubuntu-latest needs: matrix_build diff --git a/build.common.gradle b/build.common.gradle index 26a549f9..974716d3 100644 --- a/build.common.gradle +++ b/build.common.gradle @@ -91,13 +91,8 @@ dependencies { } java { - if (springBootVersion.startsWith("2.")) { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } else { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 withSourcesJar() withJavadocJar() } @@ -118,18 +113,9 @@ compileJava { options.compilerArgs << '-Xlint:-processing' } -compileTestJava { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - javaCompiler = javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(17) - } -} test { - javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) - } + testLogging { events TestLogEvent.STARTED, TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.PASSED,