Skip to content

Instantly share code, notes, and snippets.

@AdamCarroll
Last active September 20, 2018 20:39
Show Gist options
  • Save AdamCarroll/81ce8322924bcde4cf79d6691c71b927 to your computer and use it in GitHub Desktop.
Save AdamCarroll/81ce8322924bcde4cf79d6691c71b927 to your computer and use it in GitHub Desktop.
/*
* A workaround for Gradle projects using TestFX and multiple JDK versions
*
* Following conversation on this thread:
* https://github.com/TestFX/TestFX/issues/433
*
* For more info on how TestFX is being using including for headless testing see:
* https://vocabhunter.github.io/2016/07/27/TestFX.html
*/
dependencies {
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
testCompile 'org.testfx:testfx-core:4.0.14-alpha'
testRuntime 'org.testfx:openjfx-monocle:8u76-b04'
} else {
testCompile('org.testfx:testfx-core:4.0.12-alpha') {
exclude group: 'org.testfx', module: 'testfx-internal-java8'
}
testRuntime 'org.testfx:testfx-internal-java9:4.0.12-alpha'
testRuntime 'org.testfx:openjfx-monocle:jdk-9+181'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment