You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
/*
|
|
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
|
|
*/
|
|
|
|
plugins {
|
|
id("org.openjfx.javafxplugin")
|
|
}
|
|
|
|
javafx {
|
|
version = version("javafx")
|
|
modules = listOf("javafx.controls")
|
|
configuration = "compile"
|
|
}
|
|
|
|
val JDK_18: String? by lazy {
|
|
System.getenv("JDK_18")
|
|
}
|
|
|
|
val checkJdk8 by tasks.registering {
|
|
// only fail w/o JDK_18 when actually trying to test, not during project setup phase
|
|
doLast {
|
|
if (JDK_18 == null) {
|
|
throw GradleException(
|
|
"""
|
|
JDK_18 environment variable is not defined.
|
|
Can't run JDK 8 compatibility tests.
|
|
Please ensure JDK 8 is installed and that JDK_18 points to it.
|
|
""".trimIndent()
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
val jdk8Test by tasks.registering(Test::class) {
|
|
// Run these tests only during nightly stress test
|
|
onlyIf { project.properties["stressTest"] != null }
|
|
|
|
val test = tasks.test.get()
|
|
|
|
classpath = test.classpath
|
|
testClassesDirs = test.testClassesDirs
|
|
executable = "$JDK_18/bin/java"
|
|
|
|
dependsOn("compileTestKotlin")
|
|
dependsOn(checkJdk8)
|
|
}
|
|
|
|
tasks.build {
|
|
dependsOn(jdk8Test)
|
|
}
|