Skip to content

Commit

Permalink
Update the project to use JDK 21
Browse files Browse the repository at this point in the history
Upgraded all configurations from JDK 17 to JDK 21. This includes
workflow setups, build gradle files, and compiler settings to ensure
compatibility with the latest Java version.
  • Loading branch information
saschpe committed Sep 12, 2024
1 parent 34c7cd6 commit 429b43b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Run Spotless
run: ./gradlew spotlessCheck

build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Setup Android problem matchers
uses: jonasb/android-problem-matchers-action@v1
- name: Build with Gradle
Expand Down
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions customtabs-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ dependencies {
implementation("com.google.android.material:material:1.12.0")
}

java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))

android {
namespace = "com.example.saschpe.customtabs"

Expand Down Expand Up @@ -56,11 +58,4 @@ android {
signingConfig = signingConfigs.getByName("debug")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions.jvmTarget = "17"
}
9 changes: 2 additions & 7 deletions customtabs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ dependencies {
testImplementation("org.mockito:mockito-core:5.13.0")
}

java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))

android {
namespace = "saschpe.android.customtabs"

Expand All @@ -48,13 +50,6 @@ android {
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions.jvmTarget = "17"

testOptions.unitTests.isIncludeAndroidResources = true

publishing {
Expand Down

0 comments on commit 429b43b

Please sign in to comment.