< prev index next >

./build.gradle

Print this page
rev 10149 : 8201553: Update FX build to use gradle 4.8
Reviewed-by:

*** 767,800 **** logger.warn("NUM_COMPILE_THREADS was specified as '$NUM_COMPILE_THREADS' which is less than the minimum value of 1. " + "Building with a value of 1 instead.") NUM_COMPILE_THREADS = 1 } ! // Check that Gradle 1.8 is in use. ! if (gradle.gradleVersion != "1.8") { def ver = gradle.gradleVersion.split("[\\.]"); def gradleMajor = Integer.parseInt(ver[0]); ! def gradleMinor = Integer.parseInt(ver[1]); def err = ""; ! if (gradleMajor == 1) { ! if (gradleMinor < 8) { ! err = "Gradle version too old: ${gradle.gradleVersion}; must be at least 1.8" ! } ! ! // Blacklisted versions of gradle ! if (gradleMinor == 11) { ! err = "JavaFX fails to build with Gradle ${gradle.gradleVersion}; supported version is 1.8" ! } } if (IS_GRADLE_VERSION_CHECK && err != "") { fail(err); } logger.warn("*****************************************************************"); logger.warn("Unsupported gradle version $gradle.gradleVersion in use."); ! logger.warn("Only version 1.8 is supported. Use this version at your own risk"); if ( err != "") logger.warn(err); logger.warn("*****************************************************************"); } /****************************************************************************** --- 767,793 ---- logger.warn("NUM_COMPILE_THREADS was specified as '$NUM_COMPILE_THREADS' which is less than the minimum value of 1. " + "Building with a value of 1 instead.") NUM_COMPILE_THREADS = 1 } ! // Check for Gradle 4.8, error if < 4.8. ! if (gradle.gradleVersion != "4.8") { def ver = gradle.gradleVersion.split("[\\.]"); def gradleMajor = Integer.parseInt(ver[0]); ! def gradleMinor = Integer.parseInt(ver[1].split("[^0-9]")[0]); def err = ""; ! if (gradleMajor < 4 || (gradleMajor == 4 && gradleMinor < 8)) { ! err = "Gradle version too old: ${gradle.gradleVersion}; must be at least 4.8" } if (IS_GRADLE_VERSION_CHECK && err != "") { fail(err); } logger.warn("*****************************************************************"); logger.warn("Unsupported gradle version $gradle.gradleVersion in use."); ! logger.warn("Only version 4.8 is supported. Use this version at your own risk"); if ( err != "") logger.warn(err); logger.warn("*****************************************************************"); } /******************************************************************************
*** 804,813 **** --- 797,807 ---- * Log some of the settings we've determined. We could log more here, it * * doesn't really hurt. * * * *****************************************************************************/ + logger.quiet("gradle.gradleVersion: $gradle.gradleVersion") logger.quiet("OS_NAME: $OS_NAME") logger.quiet("OS_ARCH: $OS_ARCH") logger.quiet("JAVA_HOME: $JAVA_HOME") logger.quiet("JDK_HOME: $JDK_HOME") logger.quiet("java.runtime.version: ${javaRuntimeVersion}")
*** 905,920 **** } def javahTask = project.task("javah${t.capital}${capitalName}", type: JavaHeaderTask, dependsOn: project.classes, group: "Build") { description = "Generates JNI Headers for ${name} for ${t.name}" if (properties.javahSource == null) { ! source(project.sourceSets.main.output.classesDir) } else { source(properties.javahSource) } if (properties.javahClasspath == null) { ! classpath = project.files(project.sourceSets.main.output.classesDir) classpath += project.sourceSets.main.compileClasspath } else { classpath = project.files(properties.javahClasspath) } output = headerDir --- 899,914 ---- } def javahTask = project.task("javah${t.capital}${capitalName}", type: JavaHeaderTask, dependsOn: project.classes, group: "Build") { description = "Generates JNI Headers for ${name} for ${t.name}" if (properties.javahSource == null) { ! source(project.sourceSets.main.java.outputDir) } else { source(properties.javahSource) } if (properties.javahClasspath == null) { ! classpath = project.files(project.sourceSets.main.java.outputDir) classpath += project.sourceSets.main.compileClasspath } else { classpath = project.files(properties.javahClasspath) } output = headerDir
*** 976,986 **** void addJSL(Project project, String name, String pkg, Closure compile) { def lowerName = name.toLowerCase() def compileCompilers = project.task("compile${name}Compilers", type: JavaCompile, dependsOn: project.compileJava) { description = "Compile the $name JSL Compilers" ! classpath = project.files(project.sourceSets.main.output.classesDir) + rootProject.BUILD_SRC + project.configurations.antlr3 source = [project.file("src/main/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-compilers/$lowerName") } --- 970,980 ---- void addJSL(Project project, String name, String pkg, Closure compile) { def lowerName = name.toLowerCase() def compileCompilers = project.task("compile${name}Compilers", type: JavaCompile, dependsOn: project.compileJava) { description = "Compile the $name JSL Compilers" ! classpath = project.files(project.sourceSets.main.java.outputDir) + rootProject.BUILD_SRC + project.configurations.antlr3 source = [project.file("src/main/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-compilers/$lowerName") }
*** 996,1006 **** } } project.task("compile${name}JavaShaders", type: JavaCompile, dependsOn: generateShaders) { description = "Compile the Java $name JSL shaders" ! classpath = project.files(project.sourceSets.main.output.classesDir) + rootProject.BUILD_SRC source = [project.file("$project.buildDir/generated-src/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-$lowerName") } def compileHLSLShaders = project.task("compile${name}HLSLShaders", dependsOn: generateShaders, type: CompileHLSLTask) { --- 990,1000 ---- } } project.task("compile${name}JavaShaders", type: JavaCompile, dependsOn: generateShaders) { description = "Compile the Java $name JSL shaders" ! classpath = project.files(project.sourceSets.main.java.outputDir) + rootProject.BUILD_SRC source = [project.file("$project.buildDir/generated-src/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-$lowerName") } def compileHLSLShaders = project.task("compile${name}HLSLShaders", dependsOn: generateShaders, type: CompileHLSLTask) {
*** 1459,1482 **** javaexec { executable = JAVA workingDir = "modules/graphics" main = settings.generator classpath = configurations.compile + configurations.antlr3 ! classpath += files("$buildDir/classes/main") classpath += files("$buildDir/classes/jsl-compilers/decora") args = ["-i", sourceDir, "-o", destinationDir, "-t", "-pkg", "com/sun/scenario/effect", "$settings.outputs", "$settings.fileName"] jvmArgs "-Djava.ext.dirs=" } } } task generateDecoraNativeHeaders(type: JavaHeaderTask, dependsOn: compileDecoraJavaShaders) { description = "Generates JNI Headers for Decora SSE Natives" source file("$buildDir/classes/jsl-decora") ! source file("$buildDir/classes/main") include("com/sun/scenario/effect/impl/sw/sse/*"); ! classpath = files("$buildDir/classes/main", "$buildDir/classes/jsl-decora") output = file("$buildDir/generated-src/headers/jsl-decora") } task nativeDecora(dependsOn: compileDecoraHLSLShaders, group: "Build") { description = "Generates JNI headers, compiles, and builds native dynamic library for Decora" --- 1453,1476 ---- javaexec { executable = JAVA workingDir = "modules/graphics" main = settings.generator classpath = configurations.compile + configurations.antlr3 ! classpath += files("$buildDir/classes/java/main") classpath += files("$buildDir/classes/jsl-compilers/decora") args = ["-i", sourceDir, "-o", destinationDir, "-t", "-pkg", "com/sun/scenario/effect", "$settings.outputs", "$settings.fileName"] jvmArgs "-Djava.ext.dirs=" } } } task generateDecoraNativeHeaders(type: JavaHeaderTask, dependsOn: compileDecoraJavaShaders) { description = "Generates JNI Headers for Decora SSE Natives" source file("$buildDir/classes/jsl-decora") ! source file("$buildDir/classes/java/main") include("com/sun/scenario/effect/impl/sw/sse/*"); ! classpath = files("$buildDir/classes/java/main", "$buildDir/classes/jsl-decora") output = file("$buildDir/generated-src/headers/jsl-decora") } task nativeDecora(dependsOn: compileDecoraHLSLShaders, group: "Build") { description = "Generates JNI headers, compiles, and builds native dynamic library for Decora"
*** 1567,1577 **** project.cleanNativeAllTask.dependsOn cleanNativeDecora assemble.dependsOn nativeDecora processResources.dependsOn processDecoraShaders, processPrismShaders test { ! def cssDir = file("$buildDir/classes/main/javafx") jvmArgs "-Djava.ext.dirs=", "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit", "-DCSS_META_DATA_TEST_DIR=$cssDir" enableAssertions = true testLogging.exceptionFormat = "full" scanForTestClasses = false --- 1561,1571 ---- project.cleanNativeAllTask.dependsOn cleanNativeDecora assemble.dependsOn nativeDecora processResources.dependsOn processDecoraShaders, processPrismShaders test { ! def cssDir = file("$buildDir/classes/java/main/javafx") jvmArgs "-Djava.ext.dirs=", "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit", "-DCSS_META_DATA_TEST_DIR=$cssDir" enableAssertions = true testLogging.exceptionFormat = "full" scanForTestClasses = false
*** 1582,1592 **** } // To enable the IDEs to all be happy (no red squiggles) we need to have the libraries // available in some known location. Maybe in the future the Gradle plugins to each // of the IDEs will be good enough that we won't need this hack anymore. ! classes << { // Copy all of the download libraries to the libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); // In some IDEs (Eclipse for example), touching these libraries cauese a full build // within the IDE. When gradle is used outside of the IDE, for example to build the --- 1576,1587 ---- } // To enable the IDEs to all be happy (no red squiggles) we need to have the libraries // available in some known location. Maybe in the future the Gradle plugins to each // of the IDEs will be good enough that we won't need this hack anymore. ! classes { ! doLast { // Copy all of the download libraries to the libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); // In some IDEs (Eclipse for example), touching these libraries cauese a full build // within the IDE. When gradle is used outside of the IDE, for example to build the
*** 1617,1626 **** --- 1612,1622 ---- includeEmptyDirs = false rename ".*swt.*jar", "swt-debug\\.jar" } } } + } } project(":controls") { dependencies { compile BUILD_SRC, project(":base"), project(":graphics")
*** 1628,1646 **** testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output } test { ! def cssDir = file("$buildDir/classes/main/javafx") jvmArgs "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit", "-DCSS_META_DATA_TEST_DIR=$cssDir" } // TODO Css2Bin really should be moved out and put into buildSrc if it can be // TODO could change script to dynamically locate all .css files and create bss for them, probably better // TODO also not sure there is any benefit to having css files in the jfxrt.jar at all ! processResources << { ["$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/fxvk.css", --- 1624,1643 ---- testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output } test { ! def cssDir = file("$buildDir/classes/java/main/javafx") jvmArgs "-Djavafx.toolkit=com.sun.javafx.pgstub.StubToolkit", "-DCSS_META_DATA_TEST_DIR=$cssDir" } // TODO Css2Bin really should be moved out and put into buildSrc if it can be // TODO could change script to dynamically locate all .css files and create bss for them, probably better // TODO also not sure there is any benefit to having css files in the jfxrt.jar at all ! processResources { ! doLast { ["$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/embedded.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/fxvk.css",
*** 1649,1667 **** "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css -> javaexec { executable = JAVA workingDir = "modules/controls" ! classpath files("$buildDir/classes/main", project(":graphics").sourceSets.main.output, project(":base").sourceSets.main.output) main = "com.sun.javafx.css.parser.Css2Bin" args css jvmArgs "-Djava.ext.dirs=" } } } } project(":extensions") { dependencies { compile BUILD_SRC, project(":base"), project(":graphics") --- 1646,1665 ---- "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css", "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css -> javaexec { executable = JAVA workingDir = "modules/controls" ! classpath files("$buildDir/classes/java/main", project(":graphics").sourceSets.main.output, project(":base").sourceSets.main.output) main = "com.sun.javafx.css.parser.Css2Bin" args css jvmArgs "-Djava.ext.dirs=" } } } + } } project(":extensions") { dependencies { compile BUILD_SRC, project(":base"), project(":graphics")
*** 1836,1846 **** doLast { copy { from "$buildDir/native/WinLauncher/WinLauncher.exe" from "$MSVCR" from "$MSVCP" ! into "$buildDir/classes/main/com/oracle/tools/packager/windows" } } } task compileWinLibrary(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher library"; --- 1834,1844 ---- doLast { copy { from "$buildDir/native/WinLauncher/WinLauncher.exe" from "$MSVCR" from "$MSVCP" ! into "$buildDir/classes/java/main/com/oracle/tools/packager/windows" } } } task compileWinLibrary(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher library";
*** 1857,1867 **** lib = file("$buildDir/native/WinLauncher/packager.dll") linker = WIN.launcherlibrary.linker doLast { copy { from "$buildDir/native/WinLauncher/packager.dll" ! into "$buildDir/classes/main/com/oracle/tools/packager/windows" } } } task buildWinLauncherSvc(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher"; --- 1855,1865 ---- lib = file("$buildDir/native/WinLauncher/packager.dll") linker = WIN.launcherlibrary.linker doLast { copy { from "$buildDir/native/WinLauncher/packager.dll" ! into "$buildDir/classes/java/main/com/oracle/tools/packager/windows" } } } task buildWinLauncherSvc(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher";
*** 1873,1883 **** exe = true; linkerOptions.addAll(WIN.launcher.linkFlags); doLast { copy { from "$buildDir/native/WinLauncherSvc/WinLauncherSvc.exe" ! into "$buildDir/classes/main/com/oracle/tools/packager/windows" } } } task buildIconSwap(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher" --- 1871,1881 ---- exe = true; linkerOptions.addAll(WIN.launcher.linkFlags); doLast { copy { from "$buildDir/native/WinLauncherSvc/WinLauncherSvc.exe" ! into "$buildDir/classes/java/main/com/oracle/tools/packager/windows" } } } task buildIconSwap(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher"
*** 1889,1899 **** exe = true linkerOptions.addAll(WIN.iconLauncher.linkFlags) doLast { copy { from "$buildDir/native/IconSwap/IconSwap.exe" ! into "$buildDir/classes/main/com/oracle/tools/packager/windows" } } } task compileLauncher(dependsOn: [buildWinLauncher, linkWinLibrary, buildWinLauncherSvc, buildIconSwap]) jar.dependsOn compileLauncher; --- 1887,1897 ---- exe = true linkerOptions.addAll(WIN.iconLauncher.linkFlags) doLast { copy { from "$buildDir/native/IconSwap/IconSwap.exe" ! into "$buildDir/classes/java/main/com/oracle/tools/packager/windows" } } } task compileLauncher(dependsOn: [buildWinLauncher, linkWinLibrary, buildWinLauncherSvc, buildIconSwap]) jar.dependsOn compileLauncher;
*** 1902,1912 **** description = "Compiles native sources for the application co-bundle launcher" matches = ".*\\.m" source file("src/main/native/launcher/mac") params.addAll(MAC.launcher.ccFlags) compiler = MAC.launcher.compiler ! output(file("$buildDir/classes/main/com/oracle/tools/packager/mac")) eachOutputFile = { f -> return new File(f.getParent(), "JavaAppLauncher") } } task compileMacLibrary(type: CCTask, group: "Build") { --- 1900,1910 ---- description = "Compiles native sources for the application co-bundle launcher" matches = ".*\\.m" source file("src/main/native/launcher/mac") params.addAll(MAC.launcher.ccFlags) compiler = MAC.launcher.compiler ! output(file("$buildDir/classes/java/main/com/oracle/tools/packager/mac")) eachOutputFile = { f -> return new File(f.getParent(), "JavaAppLauncher") } } task compileMacLibrary(type: CCTask, group: "Build") {
*** 1920,1930 **** task linkMacLibrary(type: LinkTask, group: "Build", dependsOn: compileMacLibrary) { description = "Links native sources for the application co-bundle launcher library" objectDir = file("$buildDir/native/maclauncher/obj") linkParams.addAll(MAC.launcherlibrary.linkFlags) linker = MAC.launcherlibrary.linker ! lib = file("$buildDir/classes/main/com/oracle/tools/packager/mac/libpackager.dylib") } task compileLauncher(dependsOn: [buildMacLauncher, linkMacLibrary]) jar.dependsOn compileLauncher; } else if (IS_LINUX && COMPILE_FXPACKAGER) { task compileLinuxLauncher(type: CCTask, group: "Build") { --- 1918,1928 ---- task linkMacLibrary(type: LinkTask, group: "Build", dependsOn: compileMacLibrary) { description = "Links native sources for the application co-bundle launcher library" objectDir = file("$buildDir/native/maclauncher/obj") linkParams.addAll(MAC.launcherlibrary.linkFlags) linker = MAC.launcherlibrary.linker ! lib = file("$buildDir/classes/java/main/com/oracle/tools/packager/mac/libpackager.dylib") } task compileLauncher(dependsOn: [buildMacLauncher, linkMacLibrary]) jar.dependsOn compileLauncher; } else if (IS_LINUX && COMPILE_FXPACKAGER) { task compileLinuxLauncher(type: CCTask, group: "Build") {
*** 1938,1948 **** task linkLinuxLauncher(type: LinkTask, dependsOn: compileLinuxLauncher, group: "Build") { description = "Links native dynamic library for the application co-bundle launcher" objectDir = file("$buildDir/native/linuxlauncher/launcherobj") linkParams.addAll(LINUX.launcher.linkFlags) linker = LINUX.launcher.linker ! lib = file("$buildDir/classes/main/com/oracle/tools/packager/linux/JavaAppLauncher") } task compileLinuxLibrary(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher library" matches = ".*\\.cpp" source file("src/main/native/library/common") --- 1936,1946 ---- task linkLinuxLauncher(type: LinkTask, dependsOn: compileLinuxLauncher, group: "Build") { description = "Links native dynamic library for the application co-bundle launcher" objectDir = file("$buildDir/native/linuxlauncher/launcherobj") linkParams.addAll(LINUX.launcher.linkFlags) linker = LINUX.launcher.linker ! lib = file("$buildDir/classes/java/main/com/oracle/tools/packager/linux/JavaAppLauncher") } task compileLinuxLibrary(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher library" matches = ".*\\.cpp" source file("src/main/native/library/common")
*** 1953,1963 **** task linkLinuxLibrary(type: LinkTask, dependsOn: compileLinuxLibrary, group: "Build") { description = "Links native dynamic library for the application co-bundle launcher library" objectDir = file("$buildDir/native/linuxlauncher/obj") linkParams.addAll(LINUX.launcherlibrary.linkFlags) linker = LINUX.launcherlibrary.linker ! lib = file("$buildDir/classes/main/com/oracle/tools/packager/linux/libpackager.so") } task compileLauncher(dependsOn: [linkLinuxLauncher, linkLinuxLibrary]) jar.dependsOn compileLauncher; } --- 1951,1961 ---- task linkLinuxLibrary(type: LinkTask, dependsOn: compileLinuxLibrary, group: "Build") { description = "Links native dynamic library for the application co-bundle launcher library" objectDir = file("$buildDir/native/linuxlauncher/obj") linkParams.addAll(LINUX.launcherlibrary.linkFlags) linker = LINUX.launcherlibrary.linker ! lib = file("$buildDir/classes/java/main/com/oracle/tools/packager/linux/libpackager.so") } task compileLauncher(dependsOn: [linkLinuxLauncher, linkLinuxLibrary]) jar.dependsOn compileLauncher; }
*** 2043,2063 **** task packagerJar(type: Jar) { group = "Basic" description = "Creates the packager.jar" archiveName = "packager.jar"; includeEmptyDirs = false ! from("$buildDir/classes/main"); from("$buildDir/resources/main"); include('jdk/packager/**') dependsOn(buildJavaPackager); } jar.dependsOn buildJavaPackager jar.dependsOn packagerJar ! classes << { // Copy all of the download libraries to libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); File antLib = new File(libsDir, "ant-1.8.2.jar") libsDir.mkdirs(); for (File f : configurations.compile.files) { --- 2041,2062 ---- task packagerJar(type: Jar) { group = "Basic" description = "Creates the packager.jar" archiveName = "packager.jar"; includeEmptyDirs = false ! from("$buildDir/classes/java/main"); from("$buildDir/resources/main"); include('jdk/packager/**') dependsOn(buildJavaPackager); } jar.dependsOn buildJavaPackager jar.dependsOn packagerJar ! classes { ! doLast { // Copy all of the download libraries to libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); File antLib = new File(libsDir, "ant-1.8.2.jar") libsDir.mkdirs(); for (File f : configurations.compile.files) {
*** 2067,2076 **** --- 2066,2076 ---- include "**/ant-1.8.2.jar" includeEmptyDirs = false } } } + } task packagerFakeJar(type: Jar) { dependsOn compileTestJava from compileTestJava.destinationDir include "hello/**"
*** 2380,2390 **** } buildNative.dependsOn buildAVPlugin } if (t.name == "win") { ! def buildResources = task("buildResources") << { def rcOutputDir = "${nativeOutputDir}/${buildType}" mkdir rcOutputDir exec { environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT) commandLine (WIN.media.rcCompiler) --- 2380,2391 ---- } buildNative.dependsOn buildAVPlugin } if (t.name == "win") { ! def buildResources = task("buildResources") { ! doLast { def rcOutputDir = "${nativeOutputDir}/${buildType}" mkdir rcOutputDir exec { environment(WINDOWS_NATIVE_COMPILE_ENVIRONMENT) commandLine (WIN.media.rcCompiler)
*** 2411,2420 **** --- 2412,2422 ---- commandLine (WIN.media.rcCompiler) args(WIN.media.jfxmediaRcFlags) args("/Fo${rcOutputDir}/${WIN.media.jfxmediaRcFile}", WIN.media.rcSource) } } + } def buildGlib = task("build${t.capital}Glib", dependsOn: [buildResources]) { enabled = IS_COMPILE_MEDIA doLast { exec {
*** 2509,2520 **** sourceSets.main.java.srcDirs += "src/main/native/Source/WebCore/bindings/java/dom3/java" task generateHeaders(dependsOn: compileJava) { doLast { ! def classpath = files("$buildDir/classes/main", ! project(":graphics").sourceSets.main.output.classesDir) def dest = file("$buildDir/generated-src/headers"); mkdir dest; exec { commandLine("$JAVAH", "-J-Djava.ext.dirs=", "-d", "$dest", "-classpath", "${classpath.asPath}"); --- 2511,2522 ---- sourceSets.main.java.srcDirs += "src/main/native/Source/WebCore/bindings/java/dom3/java" task generateHeaders(dependsOn: compileJava) { doLast { ! def classpath = files("$buildDir/classes/java/main", ! project(":graphics").sourceSets.main.java.outputDir) def dest = file("$buildDir/generated-src/headers"); mkdir dest; exec { commandLine("$JAVAH", "-J-Djava.ext.dirs=", "-d", "$dest", "-classpath", "${classpath.asPath}");
*** 2565,2575 **** def webkitConfig = IS_DEBUG_NATIVE ? "Debug" : "Release" File nativeBuildDir = new File("${webkitOutputDir}") nativeBuildDir.mkdirs() ! def compileNativeTask = task("compileNative${t.capital}", dependsOn: generateHeaders) << { println "Building Webkit configuration /$webkitConfig/ into $webkitOutputDir" exec { workingDir("$webkitOutputDir") commandLine("perl", "$projectDir/src/main/native/Tools/Scripts/set-webkit-configuration", "--$webkitConfig") --- 2567,2578 ---- def webkitConfig = IS_DEBUG_NATIVE ? "Debug" : "Release" File nativeBuildDir = new File("${webkitOutputDir}") nativeBuildDir.mkdirs() ! def compileNativeTask = task("compileNative${t.capital}", dependsOn: generateHeaders) { ! doLast { println "Building Webkit configuration /$webkitConfig/ into $webkitOutputDir" exec { workingDir("$webkitOutputDir") commandLine("perl", "$projectDir/src/main/native/Tools/Scripts/set-webkit-configuration", "--$webkitConfig")
*** 2648,2657 **** --- 2651,2661 ---- copy { from "$webkitOutputDir/$webkitConfig/$dllDir/${library('DumpRenderTreeJava')}" into "$buildDir/test/${t.name}" } } + } compileNative.dependsOn compileNativeTask if (IS_WINDOWS && t.name == "win") { def rcTask = project.task("rc${t.capital}", type: CompileResourceTask) {
*** 2674,2684 **** def drtClasses = "com/sun/javafx/webkit/drt/**" jar.exclude(drtClasses) task drtJar(type: Jar, dependsOn: compileJava) { archiveName = "drt.jar" destinationDir = file("$buildDir/test") ! from "$buildDir/classes/main" include drtClasses } if (IS_COMPILE_WEBKIT) { jar.dependsOn compileNative, drtJar } --- 2678,2688 ---- def drtClasses = "com/sun/javafx/webkit/drt/**" jar.exclude(drtClasses) task drtJar(type: Jar, dependsOn: compileJava) { archiveName = "drt.jar" destinationDir = file("$buildDir/test") ! from "$buildDir/classes/java/main" include drtClasses } if (IS_COMPILE_WEBKIT) { jar.dependsOn compileNative, drtJar }
*** 2926,2954 **** def jfxrtTask = task("jfxrt$t.capital", type: Jar) { group = "Basic" description = "Creates the jfxrt.jar for the $t.name target" archiveName = "build/${sdkDirName}/rt/lib/ext/jfxrt.jar"; includeEmptyDirs = false ! from("modules/base/build/classes/main", "modules/base/build/resources/main", ! "modules/builders/build/classes/main", ! "modules/graphics/build/classes/main", "modules/graphics/build/resources/main", ! "modules/controls/build/classes/main", "modules/controls/build/resources/main", ! "modules/fxml/build/classes/main", "modules/fxml/build/resources/main", "modules/graphics/build/classes/jsl-decora", "modules/graphics/build/resources/jsl-decora", "modules/graphics/build/classes/jsl-prism", "modules/graphics/build/resources/jsl-prism", ! "modules/media/build/classes/main", "modules/media/build/resources/main") ! if (COMPILE_SWING) from ("modules/swing/build/classes/main", "modules/swing/build/resources/main") if (!IS_MAC) { ! exclude ("modules/media/build/classes/main/com/sun/media/jfxmediaimpl/platform/osx/**", "com/sun/prism/es2/MacGL*", "com/sun/glass/events/mac", "com/sun/glass/ui/mac", "com/sun/prism/es2/gl/mac" ) --- 2930,2958 ---- def jfxrtTask = task("jfxrt$t.capital", type: Jar) { group = "Basic" description = "Creates the jfxrt.jar for the $t.name target" archiveName = "build/${sdkDirName}/rt/lib/ext/jfxrt.jar"; includeEmptyDirs = false ! from("modules/base/build/classes/java/main", "modules/base/build/resources/main", ! "modules/builders/build/classes/java/main", ! "modules/graphics/build/classes/java/main", "modules/graphics/build/resources/main", ! "modules/controls/build/classes/java/main", "modules/controls/build/resources/main", ! "modules/fxml/build/classes/java/main", "modules/fxml/build/resources/main", "modules/graphics/build/classes/jsl-decora", "modules/graphics/build/resources/jsl-decora", "modules/graphics/build/classes/jsl-prism", "modules/graphics/build/resources/jsl-prism", ! "modules/media/build/classes/java/main", "modules/media/build/resources/main") ! if (COMPILE_SWING) from ("modules/swing/build/classes/java/main", "modules/swing/build/resources/main") if (!IS_MAC) { ! exclude ("modules/media/build/classes/java/main/com/sun/media/jfxmediaimpl/platform/osx/**", "com/sun/prism/es2/MacGL*", "com/sun/glass/events/mac", "com/sun/glass/ui/mac", "com/sun/prism/es2/gl/mac" )
*** 2987,2997 **** if (!targetProperties.includeNull3d) { // "com/sun/prism/null3d", // TODO This is used in dev builds but not the final sdk exclude ("com/sun/prism/null3d") } if (t.name != 'ios') { ! exclude ("modules/media/build/classes/main/com/sun/media/jfxmediaimpl/platform/ios/**", "com/sun/glass/ui/ios", "com/sun/prism/es2/IOS*" ) } if (t.name != 'android' && t.name != 'dalvik') { --- 2991,3001 ---- if (!targetProperties.includeNull3d) { // "com/sun/prism/null3d", // TODO This is used in dev builds but not the final sdk exclude ("com/sun/prism/null3d") } if (t.name != 'ios') { ! exclude ("modules/media/build/classes/java/main/com/sun/media/jfxmediaimpl/platform/ios/**", "com/sun/glass/ui/ios", "com/sun/prism/es2/IOS*" ) } if (t.name != 'android' && t.name != 'dalvik') {
*** 3006,3016 **** } else if (t.name == 'ios') { from ("modules/web/build/classes/ios", "modules/web/build/resources/ios", "modules/extensions/build/classes/ios") } else { ! from ("modules/web/build/classes/main", "modules/web/build/resources/main") } exclude("**/javafx/embed/swt/**") if (!targetProperties.includeSWT) { --- 3010,3020 ---- } else if (t.name == 'ios') { from ("modules/web/build/classes/ios", "modules/web/build/resources/ios", "modules/extensions/build/classes/ios") } else { ! from ("modules/web/build/classes/java/main", "modules/web/build/resources/main") } exclude("**/javafx/embed/swt/**") if (!targetProperties.includeSWT) {
*** 3047,3058 **** enabled = COMPILE_SWT group = "Basic" description = "Creates the jfxswt.jar for the $t.name target" archiveName = "build/${sdkDirName}/rt/lib/jfxswt.jar"; includeEmptyDirs = false ! from("modules/swt/build/classes/main"); ! from("modules/builders/build/classes/main"); include("**/javafx/embed/swt/**") exclude("**/*.java"); // Builder java files are in build/classes and should be excluded dependsOn(subprojects.collect { project -> project.getTasksByName("assemble", true)}); } --- 3051,3062 ---- enabled = COMPILE_SWT group = "Basic" description = "Creates the jfxswt.jar for the $t.name target" archiveName = "build/${sdkDirName}/rt/lib/jfxswt.jar"; includeEmptyDirs = false ! from("modules/swt/build/classes/java/main"); ! from("modules/builders/build/classes/java/main"); include("**/javafx/embed/swt/**") exclude("**/*.java"); // Builder java files are in build/classes and should be excluded dependsOn(subprojects.collect { project -> project.getTasksByName("assemble", true)}); }
*** 3069,3079 **** def jmxTask = task ("jmx${t.capital}", type: Jar) { group = "Basic" description = "Creates the javafx-mx.jar" archiveName = "build/${sdkDirName}/lib/javafx-mx.jar"; includeEmptyDirs = false ! from "modules/jmx/build/classes/main" from "modules/jmx/build/resources/main" dependsOn project(":jmx").assemble } // The 'sdk' task will build the rest of the SDK, and depends on the 'jfxrtTask' task. After --- 3073,3083 ---- def jmxTask = task ("jmx${t.capital}", type: Jar) { group = "Basic" description = "Creates the javafx-mx.jar" archiveName = "build/${sdkDirName}/lib/javafx-mx.jar"; includeEmptyDirs = false ! from "modules/jmx/build/classes/java/main" from "modules/jmx/build/resources/main" dependsOn project(":jmx").assemble } // The 'sdk' task will build the rest of the SDK, and depends on the 'jfxrtTask' task. After
*** 3246,3263 **** * The applications to be built will be under ./apps, but also must * be listed in the applications listed in the setting variable: JFXApplications */ ext.JFXRT_CP = files( ! project(":base").sourceSets.main.output.classesDir, ! project(":graphics").sourceSets.main.output.classesDir, ! project(":controls").sourceSets.main.output.classesDir, ! project(":fxml").sourceSets.main.output.classesDir, ! project(":swing").sourceSets.main.output.classesDir, //NOTE - used by 3Dviewer ! project(":builders").sourceSets.main.output.classesDir, ! "modules/media/build/classes/main", ! "modules/web/build/classes/main", ) project(":apps") { // The apps build is Ant based, and gradle lets us "import" ant build.xml // into our configuration. --- 3250,3267 ---- * The applications to be built will be under ./apps, but also must * be listed in the applications listed in the setting variable: JFXApplications */ ext.JFXRT_CP = files( ! project(":base").sourceSets.main.java.outputDir, ! project(":graphics").sourceSets.main.java.outputDir, ! project(":controls").sourceSets.main.java.outputDir, ! project(":fxml").sourceSets.main.java.outputDir, ! project(":swing").sourceSets.main.java.outputDir, //NOTE - used by 3Dviewer ! project(":builders").sourceSets.main.java.outputDir, ! "modules/media/build/classes/java/main", ! "modules/web/build/classes/java/main", ) project(":apps") { // The apps build is Ant based, and gradle lets us "import" ant build.xml // into our configuration.
< prev index next >