Skip to content

Commit a889a3e

Browse files
committed
configure tests to be executed using the custom jre produced by the runtime plugin
1 parent d52e624 commit a889a3e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@ tasks.withType(JavaCompile).configureEach {
6969
}
7070

7171
test {
72+
dependsOn 'runtime'
7273
useJUnitPlatform()
7374
finalizedBy(jacocoTestReport)
75+
76+
doFirst {
77+
def javaExecutable = System.getProperty("os.name").toLowerCase().contains("windows") ? "java.exe" : "java"
78+
79+
executable = layout.buildDirectory.file("jre/bin/$javaExecutable").get().asFile.absolutePath
80+
}
7481
}
7582

7683
application {

0 commit comments

Comments
 (0)