From 65667cf4e7f1213f6ec05ae5eb910d497888d870 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Fri, 8 Sep 2023 13:02:04 +0200 Subject: [PATCH 1/2] Add Gradle Toolchain Resolver --- gradle/verification-metadata.xml | 26 ++++++++++++++++++++++++++ settings.gradle | 14 ++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 67c9b8bf69..6f9917f32b 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -312,6 +312,14 @@ + + + + + + + + @@ -327,6 +335,11 @@ + + + + + @@ -1260,6 +1273,19 @@ + + + + + + + + + + + + + diff --git a/settings.gradle b/settings.gradle index 5f45142f94..4f3b196ff9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,6 +5,20 @@ pluginManagement { includeBuild('build-logic') } +plugins { + id("org.gradle.toolchains.foojay-resolver") version "0.7.0" +} + +toolchainManagement { + jvm { + javaRepositories { + repository("foojay") { + resolverClass = org.gradle.toolchains.foojay.FoojayToolchainResolver + } + } + } +} + include 'proto' include 'assets' include 'common' From 990ed8b1e67bf84dc7e8a772e1b53d34765c8411 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Fri, 8 Sep 2023 13:03:29 +0200 Subject: [PATCH 2/2] Gradle: Enforce same JDK everywhere --- .github/workflows/build.yml | 2 +- .../commons/src/main/groovy/bisq.java-conventions.gradle | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d272641a21..2a9d58af82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - java: [ '11', '11.0.3', '15', '15.0.5'] + java: ['11'] name: Test Java ${{ matrix.Java }}, ${{ matrix.os }} steps: - uses: actions/checkout@v4.0.0 diff --git a/build-logic/commons/src/main/groovy/bisq.java-conventions.gradle b/build-logic/commons/src/main/groovy/bisq.java-conventions.gradle index 08c9fb5d90..99e87d2026 100644 --- a/build-logic/commons/src/main/groovy/bisq.java-conventions.gradle +++ b/build-logic/commons/src/main/groovy/bisq.java-conventions.gradle @@ -8,8 +8,13 @@ repositories { maven { url "https://jitpack.io" } } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(11) + vendor = JvmVendorSpec.AZUL + implementation = JvmImplementation.VENDOR_SPECIFIC + } +} tasks.withType(JavaCompile) { options.encoding = 'UTF-8'