From 3b8afebce5310e12611a245c3d922771eebccb46 Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Tue, 15 Oct 2024 17:26:35 +0200 Subject: [PATCH] Use Java 21 in jvm toolchain --- .github/workflows/app-build.yaml | 2 +- .github/workflows/app-lint.yaml | 2 +- .github/workflows/app-publish.yaml | 2 +- .github/workflows/app-test.yaml | 2 +- build.gradle.kts | 2 +- buildSrc/build.gradle.kts | 2 +- buildSrc/settings.gradle.kts | 7 +++++++ gradle/libs.versions.toml | 1 + 8 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 buildSrc/settings.gradle.kts diff --git a/.github/workflows/app-build.yaml b/.github/workflows/app-build.yaml index 345a7712c8..f7e5a6bd36 100644 --- a/.github/workflows/app-build.yaml +++ b/.github/workflows/app-build.yaml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - name: Assemble debug APKs diff --git a/.github/workflows/app-lint.yaml b/.github/workflows/app-lint.yaml index d43c78bb4c..8e9782fdfa 100644 --- a/.github/workflows/app-lint.yaml +++ b/.github/workflows/app-lint.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - name: Run detekt and lint tasks diff --git a/.github/workflows/app-publish.yaml b/.github/workflows/app-publish.yaml index 2c41eabbaf..dcc2c82d9c 100644 --- a/.github/workflows/app-publish.yaml +++ b/.github/workflows/app-publish.yaml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - name: Set JELLYFIN_VERSION diff --git a/.github/workflows/app-test.yaml b/.github/workflows/app-test.yaml index 746ade2238..bfca072f4f 100644 --- a/.github/workflows/app-test.yaml +++ b/.github/workflows/app-test.yaml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - name: Run test task diff --git a/build.gradle.kts b/build.gradle.kts index db501b0b0d..4163390f96 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ buildscript { java { toolchain { - languageVersion.set(JavaLanguageVersion.of("17")) + languageVersion.set(JavaLanguageVersion.of(libs.versions.java.jdk.get())) } } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 499880d87b..0734b22e8a 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -4,7 +4,7 @@ plugins { kotlin { jvmToolchain { - languageVersion.set(JavaLanguageVersion.of("17")) + languageVersion.set(JavaLanguageVersion.of(libs.versions.java.jdk.get())) } } diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 0000000000..8e6efa3d00 --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,7 @@ +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8d245021ac..f7fb63043f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,6 +26,7 @@ androidx-window = "1.3.0" androidx-work = "2.9.1" coil = "2.7.0" detekt = "1.23.7" +java-jdk = "21" jellyfin-androidx-media = "1.3.1+2" jellyfin-apiclient = "v0.7.10" jellyfin-sdk = "1.6.0-beta.1"