Skip to content
Merged
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
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation 'com.auth0:java-jwt:4.5.1'
implementation 'org.bouncycastle:bcprov-jdk18on:1.84'

testImplementation 'org.junit.jupiter:junit-jupiter:5.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter:6.1.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.23.0'
}
Expand All @@ -28,6 +28,12 @@ tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

// JUnit 6 requires Java 17+
tasks.named('compileTestJava') {
sourceCompatibility = '17'
targetCompatibility = '17'
}
Comment on lines +32 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I have one question. Since JUnit 6 requires Java 17 at runtime, is configuring sourceCompatibility and targetCompatibility only for compileTestJava sufficient here? This ensures the test code is compiled for Java 17, but as I far as I know , it doesn't necessarily ensure that the tests are actually executed using Java 17. Should we configure the Java toolchain or test JVM to use Java 17 as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java toolchain test VM is run on 17, 21, and 25 today, configured in the GitHub CI configuration


javadoc {
source = sourceSets.main.allJava
options.encoding = 'UTF-8'
Expand Down
Loading