Skip to content

Commit 3607141

Browse files
Add an explicit dependency to junit-platform-launcher (#166)
* Add an explicit dependency to junit-platform-launcher It's possible to do this a different way via `useJunitJupiter(libs.versions.junit)`, but dependency bots struggle with this. See e.g. renovatebot/renovate#29918 * Add the junit-platform-launcher dependency to the version catalog * Use Junit 6.x now that the jupiter & junit-platform versions are aligned * Up the toolchain version to allow us to use Junit 6 * Up the JDK version in CI
1 parent edc312a commit 3607141

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
id: download-java
3333
with:
3434
distribution: temurin
35-
java-version: 11
35+
java-version: 17
3636

3737
- name: Setup Java JDK
3838
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
3939
with:
4040
distribution: jdkfile
41-
java-version: 11
41+
java-version: 17
4242
jdkFile: ${{ steps.download-java.outputs.jdkFile }}
4343

4444
- name: Setup Gradle

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ group = "com.opencastsoftware"
99

1010
description = "A Prettier Printer for Java"
1111

12-
java { toolchain.languageVersion.set(JavaLanguageVersion.of(11)) }
12+
java { toolchain.languageVersion.set(JavaLanguageVersion.of(17)) }
1313

1414
dependencies { compileOnlyApi(libs.apiGuardian) }
1515

@@ -24,6 +24,7 @@ testing {
2424
implementation(libs.equalsVerifier)
2525
implementation(libs.toStringVerifier)
2626
implementation(libs.apacheCommonsText)
27+
runtimeOnly(libs.junitPlatformLauncher)
2728
}
2829
}
2930
}

gradle/libs.versions.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gradleJavaConventions = "0.2.0"
66
hamcrest = "3.0"
77
jacoco = "0.8.8"
88
jqwik = "1.9.2"
9-
junit = "5.11.4"
9+
junit = "6.0.2"
1010
toStringVerifier = "1.4.8"
1111

1212
[libraries]
@@ -16,7 +16,8 @@ equalsVerifier = { module = "nl.jqno.equalsverifier:equalsverifier", version.ref
1616
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
1717
jqwik = { module = "net.jqwik:jqwik", version.ref = "jqwik" }
1818
junitJupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
19+
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit" }
1920
toStringVerifier = { module = "com.jparams:to-string-verifier", version.ref = "toStringVerifier" }
2021

2122
[plugins]
22-
gradleJavaConventions = { id = "com.opencastsoftware.gradle.java-conventions", version.ref = "gradleJavaConventions" }
23+
gradleJavaConventions = { id = "com.opencastsoftware.gradle.java-conventions", version.ref = "gradleJavaConventions" }

0 commit comments

Comments
 (0)