Skip to content

Commit

Permalink
Upgrade JDK 18 -> 21
Browse files Browse the repository at this point in the history
  • Loading branch information
dzirbel committed Apr 14, 2024
1 parent c30fb92 commit 25b23a1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '18'
java-version: '21'

- run: ./gradlew --stacktrace --continue check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '18'
java-version: '21'

- name: Download B2 binary
run: curl https://github.com/Backblaze/B2_Command_Line_Tool/releases/download/v2.1.0/b2-linux -L -o b2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '18'
java-version: '21'

- run: ./gradlew --stacktrace packageReleaseDistributionForCurrentOS packageReleaseUberJarForCurrentOS

Expand Down
10 changes: 8 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,14 @@ fun Project.configureTests() {
exceptionFormat = TestExceptionFormat.FULL
}

// allowing mocking of java.time in JDK 16+ per https://mockk.io/doc/md/jdk16-access-exceptions.html
jvmArgs = listOf("--add-opens", "java.base/java.time=ALL-UNNAMED")
jvmArgs = listOf(
// allowing mocking of java.time in JDK 16+ per https://mockk.io/doc/md/jdk16-access-exceptions.html
"--add-opens",
"java.base/java.time=ALL-UNNAMED",

// avoid warning for mockk dynamic agent loading in Java 21+: https://github.com/mockito/mockito/issues/3037
"-XX:+EnableDynamicAgentLoading",
)

// hacky, but causes gradle builds to fail if tests write or std_err (which often indicates exceptions handled
// by the Thread.uncaughtExceptionHandler)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ detekt = "1.23.6" # https://github.com/detekt/detekt
exposed = "0.49.0" # https://github.com/JetBrains/Exposed
jacoco = "0.8.12" # https://github.com/jacoco/jacoco
junit5 = "5.10.2" # https://junit.org/junit5/
jvm = "18" # https://www.java.com/releases/; also update versions in CI workflows
jvm = "21" # https://www.java.com/releases/; also update versions in CI workflows
kotlin = "1.9.23" # https://kotlinlang.org/releases.html
kotlinx-coroutines = "1.8.0" # https://github.com/Kotlin/kotlinx.coroutines
kotlinx-serialization = "1.6.3" # https://github.com/Kotlin/kotlinx.serialization
Expand Down

0 comments on commit 25b23a1

Please sign in to comment.