-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathbuild.gradle
34 lines (29 loc) · 1022 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* 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 = javafx_version
modules = ['javafx.controls']
configuration = 'compile'
}
task checkJdk8() {
// only fail w/o JDK_18 when actually trying to test, not during project setup phase
doLast {
if (!System.env.JDK_18) {
throw new 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.")
}
}
}
task jdk8Test(type: Test, dependsOn: [compileTestKotlin, checkJdk8]) {
classpath = files { test.classpath }
testClassesDirs = files { test.testClassesDirs }
executable = "$System.env.JDK_18/bin/java"
}
// Run these tests only during nightly stress test
jdk8Test.onlyIf { project.properties['stressTest'] != null }
build.dependsOn jdk8Test