From 118014e213413f29a55903dcc9cd9a5fea176288 Mon Sep 17 00:00:00 2001 From: Sean Yap Date: Tue, 19 Feb 2019 00:03:58 +0800 Subject: [PATCH 1/2] build.gradle: fix headless task issue --- build.gradle | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a3636f538..e2dc4a3fe 100644 --- a/build.gradle +++ b/build.gradle @@ -132,6 +132,24 @@ test { } } + +task headless { + doLast { + println 'Setting headless mode properties.' + test { + systemProperties = [ + 'testfx.robot': 'glass', + 'testfx.headless': 'true', + 'prism.order': 'sw', + 'prism.text': 't2k', + ] + } + } +} + +// Makes sure that headless properties are set before running tests +test.mustRunAfter headless + asciidoctor { backends 'html5' sourceDir 'docs' @@ -169,4 +187,4 @@ task copyStylesheets(type: Copy) { } asciidoctor.dependsOn copyStylesheets -defaultTasks 'clean', 'test', 'asciidoctor', 'checkstyleMain', 'checkstyleTest' +defaultTasks 'clean', 'headless', 'test', 'asciidoctor', 'checkstyleMain', 'checkstyleTest' From 6acdff015a238ebd247e9f50a3c072e301bbc0e6 Mon Sep 17 00:00:00 2001 From: Sean Yap Date: Tue, 19 Feb 2019 00:09:26 +0800 Subject: [PATCH 2/2] appveyor.yml: fixed type in the task "test" --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e928a53a0..e38fda457 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ build_script: - gradlew.bat --no-daemon assemble checkstyleMain checkstyleTest test_script: - - gradlew.bat --no-daemon headless allTests + - gradlew.bat --no-daemon headless test environment: JAVA_HOME: C:\Program Files\Java\jdk9 # Use 64-bit Java