diff --git a/.github/actions/run-gradle/action.yml b/.github/actions/run-gradle/action.yml
index a4b1bc129f6c..d91435a95ca5 100644
--- a/.github/actions/run-gradle/action.yml
+++ b/.github/actions/run-gradle/action.yml
@@ -12,7 +12,7 @@ runs:
id: setup-gradle-jdk
with:
distribution: temurin
- java-version: 17
+ java-version: 21
- uses: gradle/gradle-build-action@v2
env:
JAVA_HOME: ${{ steps.setup-gradle-jdk.outputs.path }}
diff --git a/.github/workflows/cross-version.yml b/.github/workflows/cross-version.yml
index 5a9a309ab286..e71a1adf00dd 100644
--- a/.github/workflows/cross-version.yml
+++ b/.github/workflows/cross-version.yml
@@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [21, 22]
+ jdk: [22]
name: "OpenJDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0fef409ed53d..f4cde61a60b1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -31,7 +31,7 @@ jobs:
uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
- java-version: '17'
+ java-version: '21'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
diff --git a/README.md b/README.md
index 2f3c0be2b3ad..a477d7e00f04 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ task outputs from previous CI builds.
## Building from Source
-You need [JDK 17] to build JUnit 5. [Gradle toolchains] are used to detect and
+You need [JDK 21] to build JUnit 5. [Gradle toolchains] are used to detect and
potentially download additional JDKs for compilation and test execution.
All modules can be _built_ and _tested_ with the [Gradle Wrapper] using the following command.
@@ -100,7 +100,7 @@ See also for releases and
[Gradle Wrapper]: https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:using_wrapper
[JaCoCo]: https://www.eclemma.org/jacoco/
[Javadoc]: https://junit.org/junit5/docs/current/api/
-[JDK 17]: https://foojay.io/almanac/java-17/
+[JDK 21]: https://foojay.io/almanac/java-21/
[Release Notes]: https://junit.org/junit5/docs/current/release-notes/
[Samples]: https://github.com/junit-team/junit5-samples
[StackOverflow]: https://stackoverflow.com/questions/tagged/junit5
diff --git a/gradle/plugins/common/src/main/kotlin/JavaLibraryExtension.kt b/gradle/plugins/common/src/main/kotlin/JavaLibraryExtension.kt
index 834374bf06c6..64a61da7fb7b 100644
--- a/gradle/plugins/common/src/main/kotlin/JavaLibraryExtension.kt
+++ b/gradle/plugins/common/src/main/kotlin/JavaLibraryExtension.kt
@@ -2,6 +2,6 @@ import org.gradle.api.JavaVersion
open class JavaLibraryExtension {
var mainJavaVersion: JavaVersion = JavaVersion.VERSION_1_8
- var testJavaVersion: JavaVersion = JavaVersion.VERSION_17
+ var testJavaVersion: JavaVersion = JavaVersion.VERSION_21
var configureRelease: Boolean = true
}
diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.java-toolchain-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.java-toolchain-conventions.gradle.kts
index 68735c0c9168..41f9376e8dbd 100644
--- a/gradle/plugins/common/src/main/kotlin/junitbuild.java-toolchain-conventions.gradle.kts
+++ b/gradle/plugins/common/src/main/kotlin/junitbuild.java-toolchain-conventions.gradle.kts
@@ -5,7 +5,7 @@ plugins {
}
project.pluginManager.withPlugin("java") {
- val defaultLanguageVersion = JavaLanguageVersion.of(17)
+ val defaultLanguageVersion = JavaLanguageVersion.of(21)
val javaLanguageVersion = buildParameters.javaToolchainVersion.map { JavaLanguageVersion.of(it) }.getOrElse(defaultLanguageVersion)
val extension = the()
diff --git a/gradle/plugins/settings.gradle.kts b/gradle/plugins/settings.gradle.kts
index 0b948c46d94f..43bfc1bd7621 100644
--- a/gradle/plugins/settings.gradle.kts
+++ b/gradle/plugins/settings.gradle.kts
@@ -1,4 +1,4 @@
-val expectedJavaVersion = JavaVersion.VERSION_17
+val expectedJavaVersion = JavaVersion.VERSION_21
val actualJavaVersion = JavaVersion.current()
require(actualJavaVersion == expectedJavaVersion) {
"The JUnit 5 build must be executed with Java ${expectedJavaVersion.majorVersion}. Currently executing with Java ${actualJavaVersion.majorVersion}."
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 7f93135c49b7..d64cd4917707 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 46671acb6e14..a6d2c525ae57 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
+distributionSha256Sum=547d33f88a30b6d9666c79fde614b1e5a1a3e2f86216bc70c4c7e3421f0d4627
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-rc-2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
index f801058f4e59..76d432b9564c 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
@@ -338,6 +338,7 @@ void convertsStringToCurrency() {
}
@Test
+ @SuppressWarnings("deprecation")
void convertsStringToLocale() {
assertConverts("en", Locale.class, Locale.ENGLISH);
assertConverts("en_us", Locale.class, new Locale(Locale.US.toString()));