Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgradle to 8.5-rc-2 and use JDK 21 for build and tests #3547

Merged
merged 2 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jdk: [21, 22]
jdk: [22]
name: "OpenJDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -100,7 +100,7 @@ See also <https://repo1.maven.org/maven2/org/junit/> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<JavaPluginExtension>()
Expand Down
2 changes: 1 addition & 1 deletion gradle/plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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}."
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down
Loading