1545 workingDir = "modules/graphics"
1546 main = "CompileJSL"
1547 classpath = configurations.compile + configurations.antlr3
1548 classpath += files("$buildDir/classes/jsl-compilers/prism", "modules/graphics/src/main/jsl-prism") // for the .stg
1549 args = ["-i", sourceDir, "-o", destinationDir, "-t", "-pkg", "com/sun/prism", "-d3d", "-es2", "-name", "$file"]
1550 jvmArgs "-Djava.ext.dirs="
1551 }
1552 }
1553 }
1554
1555 classes.dependsOn compilePrismJavaShaders;
1556 nativePrism.dependsOn compilePrismHLSLShaders;
1557
1558 project.nativeAllTask.dependsOn nativeDecora
1559 project.cleanNativeAllTask.dependsOn cleanNativeDecora
1560 assemble.dependsOn nativeDecora
1561 processResources.dependsOn processDecoraShaders, processPrismShaders
1562
1563 test {
1564 def cssDir = file("$buildDir/classes/main/javafx")
1565 jvmArgs "-Djava.ext.dirs=", "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit",
1566 "-DCSS_META_DATA_TEST_DIR=$cssDir"
1567 enableAssertions = true
1568 testLogging.exceptionFormat = "full"
1569 scanForTestClasses = false
1570 include "**/*Test.*"
1571 if (BUILD_CLOSED && DO_JCOV) {
1572 addJCov(project, test)
1573 }
1574 }
1575
1576 // To enable the IDEs to all be happy (no red squiggles) we need to have the libraries
1577 // available in some known location. Maybe in the future the Gradle plugins to each
1578 // of the IDEs will be good enough that we won't need this hack anymore.
1579 classes << {
1580 // Copy all of the download libraries to the libs directory for the sake of the IDEs
1581 File libsDir = rootProject.file("build/libs");
1582
1583 // In some IDEs (Eclipse for example), touching these libraries cauese a full build
1584 // within the IDE. When gradle is used outside of the IDE, for example to build the
1585 // native code, a full rebuild is caused within the IDE. The fix is to check for the
1606 into libsDir
1607 from f.getParentFile()
1608 include "**/*swt*.jar"
1609 includeEmptyDirs = false
1610 rename ".*swt.*jar", "swt-debug\\.jar"
1611 }
1612 }
1613 }
1614 }
1615
1616 project(":controls") {
1617 dependencies {
1618 compile BUILD_SRC, project(":base"), project(":graphics")
1619 // TODO not sure how to specify this? processResources project(":base"), project(":graphics")
1620 testCompile project(":graphics").sourceSets.test.output
1621 testCompile project(":base").sourceSets.test.output
1622 }
1623
1624 test {
1625 def cssDir = file("$buildDir/classes/main/javafx")
1626 jvmArgs "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit",
1627 "-DCSS_META_DATA_TEST_DIR=$cssDir"
1628 }
1629
1630 // TODO Css2Bin really should be moved out and put into buildSrc if it can be
1631 // TODO could change script to dynamically locate all .css files and create bss for them, probably better
1632 // TODO also not sure there is any benefit to having css files in the jfxrt.jar at all
1633 processResources << {
1634 ["$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian.css",
1635 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css",
1636 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css",
1637 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded.css",
1638 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/fxvk.css",
1639 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/highcontrast.css",
1640 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena.css",
1641 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css",
1642 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css ->
1643 javaexec {
1644 executable = JAVA
1645 workingDir = "modules/controls"
1646 classpath files("$buildDir/classes/main",
1677 project(":swt") {
1678 tasks.all {
1679 if (!COMPILE_SWT) it.enabled = false
1680 }
1681 dependencies {
1682 compile BUILD_SRC, project(":base"), project(":graphics")
1683 compile name: SWT_FILE_NAME
1684 }
1685 }
1686
1687 project(":fxml") {
1688 dependencies {
1689 compile BUILD_SRC, project(":base"), project(":graphics"),
1690 project(":controls"), project(":swt"), project(":swing")
1691 testCompile project(":graphics").sourceSets.test.output
1692 }
1693 test {
1694 // StubToolkit is not *really* needed here, but because some code inadvertently invokes performance
1695 // tracker and this attempts to fire up the toolkit and this looks for native libraries and fails,
1696 // we have to use the stub toolkit for now.
1697 jvmArgs "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit"
1698 classpath += files("$JDK_HOME/jre/lib/ext/nashorn.jar")
1699 }
1700 }
1701
1702 project(":jmx") {
1703 dependencies {
1704 compile project(":base")
1705 compile project(":graphics")
1706 compile project(":swing")
1707 compile project(":media")
1708 }
1709
1710 // Tests are disabled until RT-33926 can be fixed
1711 test.enabled = false
1712
1713 if (!DO_BUILD_SDK_FOR_TEST) {
1714 def javafxMxJar = new File(TEST_SDK_DIR, "lib/javafx-mx.jar")
1715 [test, compileTestJava].each {
1716 it.classpath = files(javafxMxJar) + it.classpath
1717 }
|
1545 workingDir = "modules/graphics"
1546 main = "CompileJSL"
1547 classpath = configurations.compile + configurations.antlr3
1548 classpath += files("$buildDir/classes/jsl-compilers/prism", "modules/graphics/src/main/jsl-prism") // for the .stg
1549 args = ["-i", sourceDir, "-o", destinationDir, "-t", "-pkg", "com/sun/prism", "-d3d", "-es2", "-name", "$file"]
1550 jvmArgs "-Djava.ext.dirs="
1551 }
1552 }
1553 }
1554
1555 classes.dependsOn compilePrismJavaShaders;
1556 nativePrism.dependsOn compilePrismHLSLShaders;
1557
1558 project.nativeAllTask.dependsOn nativeDecora
1559 project.cleanNativeAllTask.dependsOn cleanNativeDecora
1560 assemble.dependsOn nativeDecora
1561 processResources.dependsOn processDecoraShaders, processPrismShaders
1562
1563 test {
1564 def cssDir = file("$buildDir/classes/main/javafx")
1565 jvmArgs "-Djava.ext.dirs=", "-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit",
1566 "-DCSS_META_DATA_TEST_DIR=$cssDir"
1567 enableAssertions = true
1568 testLogging.exceptionFormat = "full"
1569 scanForTestClasses = false
1570 include "**/*Test.*"
1571 if (BUILD_CLOSED && DO_JCOV) {
1572 addJCov(project, test)
1573 }
1574 }
1575
1576 // To enable the IDEs to all be happy (no red squiggles) we need to have the libraries
1577 // available in some known location. Maybe in the future the Gradle plugins to each
1578 // of the IDEs will be good enough that we won't need this hack anymore.
1579 classes << {
1580 // Copy all of the download libraries to the libs directory for the sake of the IDEs
1581 File libsDir = rootProject.file("build/libs");
1582
1583 // In some IDEs (Eclipse for example), touching these libraries cauese a full build
1584 // within the IDE. When gradle is used outside of the IDE, for example to build the
1585 // native code, a full rebuild is caused within the IDE. The fix is to check for the
1606 into libsDir
1607 from f.getParentFile()
1608 include "**/*swt*.jar"
1609 includeEmptyDirs = false
1610 rename ".*swt.*jar", "swt-debug\\.jar"
1611 }
1612 }
1613 }
1614 }
1615
1616 project(":controls") {
1617 dependencies {
1618 compile BUILD_SRC, project(":base"), project(":graphics")
1619 // TODO not sure how to specify this? processResources project(":base"), project(":graphics")
1620 testCompile project(":graphics").sourceSets.test.output
1621 testCompile project(":base").sourceSets.test.output
1622 }
1623
1624 test {
1625 def cssDir = file("$buildDir/classes/main/javafx")
1626 jvmArgs "-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit",
1627 "-DCSS_META_DATA_TEST_DIR=$cssDir"
1628 }
1629
1630 // TODO Css2Bin really should be moved out and put into buildSrc if it can be
1631 // TODO could change script to dynamically locate all .css files and create bss for them, probably better
1632 // TODO also not sure there is any benefit to having css files in the jfxrt.jar at all
1633 processResources << {
1634 ["$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian.css",
1635 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css",
1636 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css",
1637 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded.css",
1638 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/fxvk.css",
1639 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/highcontrast.css",
1640 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena.css",
1641 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css",
1642 "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css ->
1643 javaexec {
1644 executable = JAVA
1645 workingDir = "modules/controls"
1646 classpath files("$buildDir/classes/main",
1677 project(":swt") {
1678 tasks.all {
1679 if (!COMPILE_SWT) it.enabled = false
1680 }
1681 dependencies {
1682 compile BUILD_SRC, project(":base"), project(":graphics")
1683 compile name: SWT_FILE_NAME
1684 }
1685 }
1686
1687 project(":fxml") {
1688 dependencies {
1689 compile BUILD_SRC, project(":base"), project(":graphics"),
1690 project(":controls"), project(":swt"), project(":swing")
1691 testCompile project(":graphics").sourceSets.test.output
1692 }
1693 test {
1694 // StubToolkit is not *really* needed here, but because some code inadvertently invokes performance
1695 // tracker and this attempts to fire up the toolkit and this looks for native libraries and fails,
1696 // we have to use the stub toolkit for now.
1697 jvmArgs "-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit"
1698 classpath += files("$JDK_HOME/jre/lib/ext/nashorn.jar")
1699 }
1700 }
1701
1702 project(":jmx") {
1703 dependencies {
1704 compile project(":base")
1705 compile project(":graphics")
1706 compile project(":swing")
1707 compile project(":media")
1708 }
1709
1710 // Tests are disabled until RT-33926 can be fixed
1711 test.enabled = false
1712
1713 if (!DO_BUILD_SDK_FOR_TEST) {
1714 def javafxMxJar = new File(TEST_SDK_DIR, "lib/javafx-mx.jar")
1715 [test, compileTestJava].each {
1716 it.classpath = files(javafxMxJar) + it.classpath
1717 }
|