diff --git a/build.gradle b/build.gradle index 5c0329e610ec..0147a81d6551 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,19 @@ plugins { id 'application' } +if (JavaVersion.current() == JavaVersion.VERSION_1_10 + && System.getProperty('os.name').startsWith('Windows')) { + logger.warn('''\ + ============================================================================== + *********************************** WARNING ********************************** + ============================================================================== + You seem to be running Gradle with JDK 10 on Windows. + JDK 10 on Windows will fail to run tests in headless mode due to a JavaFX bug. + You are highly recommended to use JDK 9! + ============================================================================== + '''.stripIndent()) +} + // Specifies the entry point of the application mainClassName = 'seedu.address.MainApp' diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 3a6319722f99..ae92d1d6fd21 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -9,6 +9,7 @@ ifdef::env-github[] :tip-caption: :bulb: :note-caption: :information_source: +:warning-caption: :warning: endif::[] :repoURL: https://github.com/se-edu/addressbook-level4/tree/master @@ -19,6 +20,11 @@ By: `Team SE-EDU`      Since: `Jun 2016`      Licence: `MIT` === Prerequisites . *JDK `9`* or later ++ +[WARNING] +JDK `10` on Windows will fail to run tests in <> due to a https://github.com/javafxports/openjdk-jfx/issues/66[JavaFX bug]. +Windows developers are highly recommended to use JDK `9`. + . *IntelliJ* IDE + [NOTE] diff --git a/docs/UsingGradle.adoc b/docs/UsingGradle.adoc index 84c9dd193491..6c813f551228 100644 --- a/docs/UsingGradle.adoc +++ b/docs/UsingGradle.adoc @@ -5,6 +5,7 @@ ifdef::env-github[] :tip-caption: :bulb: :note-caption: :information_source: +:warning-caption: :warning: endif::[] https://gradle.org/[Gradle] is a build automation tool. It can automate build-related tasks such as @@ -75,6 +76,7 @@ Runs the code style check for the test code base The set of code style rules implemented can be found in `config/checkstyle/checkstyle.xml`. To enable _exceptions_ to code styles, add in the comment `//CODESTYLE.OFF: RuleName` at the start of the section and `//CODESTYLE.ON: RuleName` at the end of the section. +[[Running-Tests]] == Running Tests * **`allTests`** + @@ -86,6 +88,10 @@ Runs all non-GUI tests in the `seedu.address` package * **`headless`** + Sets the test mode as _headless_. The mode is effective for that Gradle run only so it should be combined with other test tasks. ++ +[WARNING] +JDK `10` on Windows will fail to run tests in headless mode due to a https://github.com/javafxports/openjdk-jfx/issues/66[JavaFX bug]. +Windows developers are highly recommended to use JDK `9`. Here are some examples: