Skip to content

Commit

Permalink
Fixes mockito#3179 : Add module for Java 21 tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaël Francoeur committed Nov 27, 2023
1 parent f522f49 commit 44e2040
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ include(
"osgi-test",
"bom",
"errorprone",
"programmatic-test"
"programmatic-test",
"java21"
)

// https://developer.android.com/studio/command-line/variables#envar
Expand Down
24 changes: 24 additions & 0 deletions subprojects/java21/java21.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/java-test.gradle"

description = "Test suite for Java 21 Mockito"

dependencies {
implementation project.rootProject
testImplementation libraries.junit4
testImplementation libraries.assertj
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

tasks.named('test') {
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
enabled = false
}
}
Empty file.

0 comments on commit 44e2040

Please sign in to comment.