< prev index next >

./build.gradle

Print this page
rev 10114 : 8161704: Switch to Jigsaw-aware boot JDK for compiling FX 9
Reviewed-by:

*** 1,5 **** --- 1,6 ---- + // FIXME: KCR SDK /* * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it
*** 29,41 **** * MUST FIX tasks to complete: * - build check -- making sure the final artifact has the right bits * - some things worth automatically sanity checking: * - are there images in the javadocs? * - are all of the expected dylibs etc there? - * - is jfxrt.jar there? - * - does jfxrt.jar contain stuff it shouldn't (doc-files, iml, etc) - * - does jfxrt.jar contain stuff it should (bss files, etc) * - Perform sanity checking to make sure a JDK exists with javac, javah, etc * - Support building with no known JDK location, as long as javac, javah, etc are on the path * - Check all of the native flags. We're adding weight to some libs that don't need it, and so forth. * * Additional projects to work on as we go: --- 30,39 ----
*** 256,265 **** --- 254,272 ---- def closedDir = file("../rt-closed") def buildClosed = closedDir.isDirectory() ext.BUILD_CLOSED = buildClosed + ext.RUNARGSFILE = "run.args" + ext.COMPILEARGSFILE = "compile.args" + + ext.TESTCOMPILEARGSFILE = "testcompile.args" + ext.TESTRUNARGSFILE = "testrun.args" + ext.TESTJAVAPOLICYFILE = 'test.java.policy' + + ext.MODULESOURCEPATH = "modulesourcepath.args" + // These variables indicate what platform is running the build. Is // this build running on a Mac, Windows, or Linux machine? 32 or 64 bit? ext.OS_NAME = System.getProperty("os.name").toLowerCase() ext.OS_ARCH = System.getProperty("os.arch") ext.IS_64 = OS_ARCH.toLowerCase().contains("64")
*** 280,290 **** fail("Unknown and unsupported build architecture: $OS_ARCH") } // Get the JDK_HOME automatically based on the version of Java used to execute gradle. Or, if specified, ! // use a user supplied JDK_HOME, STUB_RUNTIME, JAVAC, and/or JAVAH, all of which may be specified // independently (or we'll try to get the right one based on other supplied info). Sometimes the // JRE might be the thing that is being used instead of the JRE embedded in the JDK, such as: // c:\Program Files (x86)\Java\jdk1.8.0\jre // c:\Program Files (x86)\Java\jre8\ // Because of this, you may sometimes get the jdk's JRE (in which case the logic we used to have here --- 287,297 ---- fail("Unknown and unsupported build architecture: $OS_ARCH") } // Get the JDK_HOME automatically based on the version of Java used to execute gradle. Or, if specified, ! // use a user supplied JDK_HOME, STUB_RUNTIME, JAVAC, all of which may be specified // independently (or we'll try to get the right one based on other supplied info). Sometimes the // JRE might be the thing that is being used instead of the JRE embedded in the JDK, such as: // c:\Program Files (x86)\Java\jdk1.8.0\jre // c:\Program Files (x86)\Java\jre8\ // Because of this, you may sometimes get the jdk's JRE (in which case the logic we used to have here
*** 299,352 **** javaHomeFile.name.startsWith("jre") ? new File(javaHomeFile.getParent(), "jdk1.${javaHomeFile.name.substring(3)}.0").toString() : javaHome) // we have to bail and set it to something and this is as good as any! ext.JAVA_HOME = JDK_HOME - // Check whether JIGSAW_HOME is set. If it is, then it points to a JDK9 - // jigsaw build with modularization enabled and can be used for testing - def envJigsawHome = cygpath(System.getenv("JIGSAW_HOME")) - defineProperty("JIGSAW_HOME", envJigsawHome); - - if (JIGSAW_HOME == null || JIGSAW_HOME == "") { - logger.warn("JIGSAW_HOME is not set"); - ext.USE_JIGSAW = false - } else { - ext.USE_JIGSAW = true - } - defineProperty("JAVA", cygpath("$JDK_HOME/bin/java${IS_WINDOWS ? '.exe' : ''}")) - defineProperty("JIGSAW_JAVA", cygpath("$JIGSAW_HOME/bin/java${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVAC", cygpath("$JDK_HOME/bin/javac${IS_WINDOWS ? '.exe' : ''}")) - defineProperty("JIGSAW_JAVAC", cygpath("$JIGSAW_HOME/bin/javac${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVAH", cygpath("$JDK_HOME/bin/javah${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVADOC", cygpath("$JDK_HOME/bin/javadoc${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JDK_DOCS", "https://docs.oracle.com/javase/8/docs/api/") ! defineProperty("JIGSAW_MODULES", cygpath(System.getenv("JIGSAW_MODULES")) ?: cygpath(System.getenv("JIGSAW_HOME") + "/jmods")) defineProperty("javaRuntimeVersion", System.getProperty("java.runtime.version")) def javaVersionInfo = parseJavaVersion(javaRuntimeVersion) defineProperty("javaVersion", javaVersionInfo[0]) defineProperty("javaBuildNumber", javaVersionInfo[1]) loadProperties("$projectDir/build.properties") ! // Look for stub runtime in either old (JDK 8u) or new (JDK 9) dir layout ! def cachesSdkRtDir = file("../caches/sdk/rt") ! def hasRtDir = cachesSdkRtDir.isDirectory() ! def String closedCacheStubRuntime = cygpath("$projectDir") + "/../caches/sdk" + (hasRtDir ? "/rt" : "") ! def jdkHomeJreDir = file("$JDK_HOME/jre") ! def hasJreDir = jdkHomeJreDir.isDirectory() ! def String jreStubRuntime = cygpath("$JDK_HOME") + (hasJreDir ? "/jre" : "") ! defineProperty("STUB_RUNTIME", BUILD_CLOSED ? closedCacheStubRuntime : jreStubRuntime) ! defineProperty("LIBRARY_STUB", IS_MAC ? "$STUB_RUNTIME/lib" : IS_WINDOWS ? "$STUB_RUNTIME/bin" : ! "$STUB_RUNTIME/lib/$OS_ARCH") ! defineProperty("UPDATE_STUB_CACHE", (STUB_RUNTIME.equals(closedCacheStubRuntime) ? 'true' : 'false')) def supplementalPreBuildFile = file("$closedDir/closed-pre-build.gradle"); def supplementalBuildFile = file("$closedDir/closed-build.gradle"); if (BUILD_CLOSED) { --- 306,354 ---- javaHomeFile.name.startsWith("jre") ? new File(javaHomeFile.getParent(), "jdk1.${javaHomeFile.name.substring(3)}.0").toString() : javaHome) // we have to bail and set it to something and this is as good as any! ext.JAVA_HOME = JDK_HOME defineProperty("JAVA", cygpath("$JDK_HOME/bin/java${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVAC", cygpath("$JDK_HOME/bin/javac${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVAH", cygpath("$JDK_HOME/bin/javah${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JAVADOC", cygpath("$JDK_HOME/bin/javadoc${IS_WINDOWS ? '.exe' : ''}")) defineProperty("JDK_DOCS", "https://docs.oracle.com/javase/8/docs/api/") ! defineProperty("JDK_JMODS", cygpath(System.getenv("JDK_JMODS")) ?: cygpath(System.getenv("JDK_HOME") + "/jmods")) defineProperty("javaRuntimeVersion", System.getProperty("java.runtime.version")) def javaVersionInfo = parseJavaVersion(javaRuntimeVersion) defineProperty("javaVersion", javaVersionInfo[0]) defineProperty("javaBuildNumber", javaVersionInfo[1]) loadProperties("$projectDir/build.properties") ! // Look for stub runtime in either JDK or modular-sdk dir layout ! def String closedCacheStubRuntime = cygpath("$projectDir") + "/../caches/modular-sdk" ! def String jdkStubRuntime = cygpath("$JDK_HOME") ! defineProperty("STUB_RUNTIME", BUILD_CLOSED ? closedCacheStubRuntime : jdkStubRuntime) ! def cachedStub = STUB_RUNTIME.equals(closedCacheStubRuntime) ! ! if (cachedStub) { ! def stubModulesLib = "$STUB_RUNTIME/modules_libs" ! def dirSuffix = (IS_MAC || IS_WINDOWS) ? "" : "/$OS_ARCH" ! defineProperty("MEDIA_STUB", "$stubModulesLib/javafx.media$dirSuffix") ! defineProperty("WEB_STUB", "$stubModulesLib/javafx.web$dirSuffix") ! } else { ! def libraryStub = IS_MAC ? "$STUB_RUNTIME/lib" : IS_WINDOWS ? "$STUB_RUNTIME/bin" : ! "$STUB_RUNTIME/lib/$OS_ARCH" ! ! defineProperty("MEDIA_STUB", libraryStub) ! defineProperty("WEB_STUB", libraryStub) ! } ! ! defineProperty("UPDATE_STUB_CACHE", (cachedStub ? 'true' : 'false')) def supplementalPreBuildFile = file("$closedDir/closed-pre-build.gradle"); def supplementalBuildFile = file("$closedDir/closed-build.gradle"); if (BUILD_CLOSED) {
*** 382,392 **** // COMPILE_JFR specifies whether to build code that logs to JRockit Flight Recorder defineProperty("COMPILE_JFR", Boolean.toString(file("$JDK_HOME/jre/lib/jfr.jar").exists())) ext.IS_COMPILE_JFR = Boolean.parseBoolean(COMPILE_JFR) // BUILD_FXPACKAGER enables building the packager modules and native code ! defineProperty("BUILD_FXPACKAGER", "false") ext.IS_BUILD_FXPACKAGER = Boolean.parseBoolean(BUILD_FXPACKAGER) // RETAIN_PACKAGER_TESTS specifies whether the tests in fxpackager should // keep generated files instead of attempting to automatically delete them defineProperty("RETAIN_PACKAGER_TESTS", "false") --- 384,394 ---- // COMPILE_JFR specifies whether to build code that logs to JRockit Flight Recorder defineProperty("COMPILE_JFR", Boolean.toString(file("$JDK_HOME/jre/lib/jfr.jar").exists())) ext.IS_COMPILE_JFR = Boolean.parseBoolean(COMPILE_JFR) // BUILD_FXPACKAGER enables building the packager modules and native code ! defineProperty("BUILD_FXPACKAGER", "true") ext.IS_BUILD_FXPACKAGER = Boolean.parseBoolean(BUILD_FXPACKAGER) // RETAIN_PACKAGER_TESTS specifies whether the tests in fxpackager should // keep generated files instead of attempting to automatically delete them defineProperty("RETAIN_PACKAGER_TESTS", "false")
*** 419,431 **** // Specifies whether to run full tests (true) or smoke tests (false) defineProperty("FULL_TEST", "false") ext.IS_FULL_TEST = Boolean.parseBoolean(FULL_TEST); - defineProperty("JIGSAW_TEST", "true") - ext.IS_JIGSAW_TEST = Boolean.parseBoolean(JIGSAW_TEST) && USE_JIGSAW - defineProperty("FORCE_TESTS", "false") ext.IS_FORCE_TESTS = Boolean.parseBoolean(FORCE_TESTS); // Specifies whether to run robot-based visual tests (only used when FULL_TEST is also enabled) defineProperty("USE_ROBOT", "false") --- 421,430 ----
*** 570,596 **** if (hasProperty("CROSS_TOOLS_DIR")) { crossToolsDir = CROSS_TOOLS_DIR } ext.CROSS_TOOLS_DIR = file(crossToolsDir) ! // Specifies whether to run tests with the present jfxrt.jar instead of compiling the new one defineProperty("BUILD_SDK_FOR_TEST", "true") ext.DO_BUILD_SDK_FOR_TEST = Boolean.parseBoolean(BUILD_SDK_FOR_TEST) - // Specifies the location to point at SDK build when DO_BUILD_SDK_FOR_TEST set to false - // Used to get location of jfxrt.jar, ant-javafx.jar and javafx-mx.jar - defineProperty("TEST_SDK", JDK_HOME) - ext.TEST_SDK_DIR = file(TEST_SDK) - - def rtDir = TEST_SDK_DIR - ext.jfxrtJarFromSdk = new File(rtDir, "lib/jfxrt.jar").absolutePath - if (!DO_BUILD_SDK_FOR_TEST && !file(jfxrtJarFromSdk).exists()) { - fail ("BUILD_SDK_FOR_TEST is set to false, but there\'s no jfxrt.jar at the expected paths in TEST_SDK($TEST_SDK_DIR)\n" - + "TEST_SDK should point at either JavaFX SDK location or JDK location\n" - + "Please, set the correct TEST_SDK") - } - // All "classes" and "jar" tasks and their dependencies would be disabled // when running with DO_BUILD_SDK_FOR_TEST=false as they're unneeded for running tests if (!DO_BUILD_SDK_FOR_TEST) { gradle.taskGraph.useFilter({ task -> !task.name.equals("classes") && !task.name.equals("jar") }) } --- 569,582 ---- if (hasProperty("CROSS_TOOLS_DIR")) { crossToolsDir = CROSS_TOOLS_DIR } ext.CROSS_TOOLS_DIR = file(crossToolsDir) ! // Specifies whether to run tests with the existing javafx.* modules instead of compiling a new one defineProperty("BUILD_SDK_FOR_TEST", "true") ext.DO_BUILD_SDK_FOR_TEST = Boolean.parseBoolean(BUILD_SDK_FOR_TEST) // All "classes" and "jar" tasks and their dependencies would be disabled // when running with DO_BUILD_SDK_FOR_TEST=false as they're unneeded for running tests if (!DO_BUILD_SDK_FOR_TEST) { gradle.taskGraph.useFilter({ task -> !task.name.equals("classes") && !task.name.equals("jar") }) }
*** 702,711 **** --- 688,909 ---- logger.quiet "all tool packages are present $packages" } } } + // Make an forked ANT call. + // This needs to be forked so that ant can be used with the right JDK and updated modules + // for testing obscure things like packaging of apps + void ant(String conf, // platform configuration + String dir, // directory to run from + String target, // ant target + List<String> params // parameters (usually -Dxxx=yyy) + ) { + // Try to use ANT_HOME + String antHomeEnv = System.getenv("ANT_HOME") + String antHome = antHomeEnv != null ? cygpath(antHomeEnv) : null; + String ant = (antHome != null && !antHome.equals("")) ? "$antHome/bin/ant" : "ant"; + + exec { + workingDir = dir + environment("JDK_HOME", JDK_HOME) + environment("JAVA_HOME", JDK_HOME) + if (IS_WINDOWS) { + environment([ + "VCINSTALLDIR" : WINDOWS_VS_VCINSTALLDIR, + "VSINSTALLDIR" : WINDOWS_VS_VSINSTALLDIR, + "DEVENVDIR" : WINDOWS_VS_DEVENVDIR, + "MSVCDIR" : WINDOWS_VS_MSVCDIR, + "INCLUDE" : WINDOWS_VS_INCLUDE, + "LIB" : WINDOWS_VS_LIB, + "LIBPATH" : WINDOWS_VS_LIBPATH, + "DXSDK_DIR" : WINDOWS_DXSDK_DIR + ]); + commandLine "cmd", "/c", ant, "-Dbuild.compiler=javac1.7" + } else { + commandLine ant, "-Dbuild.compiler=javac1.7" + } + if ((conf != null) && !rootProject.defaultHostTarget.equals(conf)) { + def targetProperties = rootProject.ext[t.trim().toUpperCase()] + args("-Dcross.platform=$conf") + if (targetProperties.containsKey('arch')) { + args("-Dcross.platform.arch=${targetProperties.arch}") + } + } + if (params != null) { + params.each() { s-> + args(s) + } + } + args(target); + } + } + + List<String> computeLibraryPath(boolean working) { + List<String> lp = [] + List<String> modsWithNative = [ 'graphics', 'media', 'web' ] + + // the build/modular-sdk area + def platformPrefix = "" + def modularSdkDirName = "${platformPrefix}modular-sdk" + def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" + def modulesLibsDir = "${modularSdkDir}/modules_libs" + String suffix = "" + + if (!HOST_MODULES_ARCH.equals("")) { + suffix = "/${HOST_MODULES_ARCH}" + } + + + modsWithNative.each() { m -> + lp << cygpath("${modulesLibsDir}/javafx.${m}${suffix}") + } + return lp + } + + // Return list with the arguments needed for --patch-module for the provided projects + // used with Java executables ie. tests + List<String> computePatchModuleArgs(List<String> deps, boolean test) { + List<String> pma = [] + + deps.each {String projname -> + def proj = project(projname) + if (proj.hasProperty("moduleName")) { + File dir = proj.sourceSets.main.output.classesDir + if (test && proj.sourceSets.hasProperty('shims')) { + dir = proj.sourceSets.shims.output.classesDir + } + String moduleName = proj.ext.moduleName + String dirpath = cygpath("${dir}/${moduleName}") + pma += "--patch-module=${moduleName}=${dirpath}" + } + } + + pma += "-Djava.library.path=" + computeLibraryPath(true).join(File.pathSeparator) + + return pma + } + + // Return a list containing the --upgrade-module-path + // used with Javac + List<String> computeModulePathArgs(String pname, List<String> deps, boolean test) { + List<String> mpa = [ '--upgrade-module-path' ] + String mp = null + deps.each {String projname -> + def proj = project(projname) + // for a non test set of args, we don't want the current module in the list + // for a test test, we do need it to update what we built + + if (proj.hasProperty("moduleName") && + proj.buildModule && + !(!test && proj.name.equals(pname))) { + File dir; + if (test && proj.sourceSets.hasProperty('shims')) { + dir = new File(proj.sourceSets.shims.output.classesDir, proj.ext.moduleName); + } else { + dir = new File(proj.sourceSets.main.output.classesDir, proj.ext.moduleName); + } + if (mp == null) { + mp = dir.path + } else { + mp = mp + File.pathSeparator + dir.path + } + } + } + + // in some cases like base we could end up with an empty + // path... make sure we don't pass one back + if (mp == null) { + return null + } + + mpa += mp + return mpa + } + + void writeCompileArgsFile(File dest, List<String>path) { + dest.delete() + + logger.info("Creating file ${dest.path}") + dest << "--upgrade-module-path\n" + + dest << "\"\\\n" + path.each() { e-> + dest << " " + dest << cygpath(e) + dest << File.pathSeparator + dest << "\\\n" + } + dest << "\"\n" + } + + void writeRunArgsFile(File dest, List<String> libpath, List<String> modpath) { + + dest.delete() + + logger.info("Creating file ${dest.path}") + + dest << "-Djava.library.path=\"\\\n" + libpath.each() { e-> + dest << " " + dest << e + dest << File.pathSeparator + dest << "\\\n" + } + dest << " \"\n" + + modpath.each { e -> + dest << "--patch-module \"" + dest << e + dest << "\"\n" + } + } + + // perform common project manipulation for modules + void commonModuleSetup(Project p, List<String> moduleChain) { + + p.ext.moduleChain = moduleChain + + if (p.hasProperty("moduleName")) { + p.ext.moduleDir = new File (p.sourceSets.main.output.classesDir, "${p.moduleName}") + } + + def mpa = computeModulePathArgs(p.name, moduleChain, false) + if (mpa != null) { + p.ext.modulePathArgs = mpa + } + + p.ext.testModulePathArgs = computeModulePathArgs(p.name, moduleChain, true) + p.ext.patchModuleArgs = computePatchModuleArgs(moduleChain ,false) + p.ext.testPatchModuleArgs = computePatchModuleArgs(moduleChain, true) + + moduleChain.each() {e -> + if (!e.equals(p.name)) { + p.compileJava.dependsOn(project(e).classes) + p.compileTestJava.dependsOn(project(e).testClasses) + } + } + + // read in any addExports file + File addExportsFile = new File(p.projectDir,"src/test/addExports") + if (addExportsFile.exists()) { + List<String> ae = [] + addExportsFile.eachLine { line -> + line = line.trim() + if (!(line.startsWith("#") || line.equals(""))) { + // one line arguments are a bit easier to debug + //if (line.startsWith('--add-exports ')) { + // line = line.replaceFirst('--add-exports ', '--add-exports=') + //} + line = line.replace('--add-exports *', '--add-exports=') + ae += line.split(' ') + } + } + p.ext.addExports = ae.flatten() + } + } + // Now we need to define the native compilation tasks. The set of parameters to // native compilation depends on the target platform (and also to some extent what platform // you are compiling on). These settings are contained in various gradle files // such as mac.gradle and linux.gradle and armhf.gradle. Additionally, the developer // can specify COMPILE_FLAGS_FILE to be a URL or path to a different gradle file
*** 745,754 **** --- 943,953 ---- // Sanity check the expected properties all exist compileTargets { t -> // Every platform must define these variables if (!project.hasProperty(t.upper)) throw new Exception("ERROR: Incorrectly configured compile flags file, missing ${t.name} property") def props = project.ext[t.upper]; + // FIXME: KCR -- remove libDest in favor of modLibDest ["compileSwing", "compileSWT", "compileFXPackager", "libDest"].each { prop -> if (!props.containsKey(prop)) throw new Exception("ERROR: Incorrectly configured compile flags file, missing ${prop} property on ${t.name}") } }
*** 763,773 **** compileTargets { t -> def targetProperties = project.rootProject.ext[t.upper] if (targetProperties.compileSwing) COMPILE_SWING = true if (targetProperties.compileSWT) COMPILE_SWT = true ! if (IS_BUILD_FXPACKAGER && JIGSAW_HOME && targetProperties.compileFXPackager) COMPILE_FXPACKAGER = true if (!targetProperties.containsKey('compileWebnodeNative')) { // unless specified otherwise, we will compile native Webnode if IS_COMPILE_WEBKIT targetProperties.compileWebnodeNative = true } --- 962,972 ---- compileTargets { t -> def targetProperties = project.rootProject.ext[t.upper] if (targetProperties.compileSwing) COMPILE_SWING = true if (targetProperties.compileSWT) COMPILE_SWT = true ! if (IS_BUILD_FXPACKAGER && targetProperties.compileFXPackager) COMPILE_FXPACKAGER = true if (!targetProperties.containsKey('compileWebnodeNative')) { // unless specified otherwise, we will compile native Webnode if IS_COMPILE_WEBKIT targetProperties.compileWebnodeNative = true }
*** 786,801 **** --- 985,1003 ---- if (!targetProperties.containsKey('includeGTK')) targetProperties.includeGTK = IS_LINUX if (!targetProperties.containsKey('modLibDest')) targetProperties.modLibDest = targetProperties.libDest + if (!targetProperties.containsKey('modulesArch')) targetProperties.modulesArch = "" + // This value is used as a prefix for various directories under ./build, // such as sdk, to allow for a common name for the hosted build // (for use when building apps) and a unique name for cross builds. if (rootProject.defaultHostTarget.equals(t.name)) { // use a simple common default for the "host" build targetProperties.platformPrefix="" + rootProject.ext.HOST_MODULES_ARCH = targetProperties.modulesArch } else { // and a more complex one for cross builds targetProperties.platformPrefix="${t.name}-" } }
*** 815,827 **** throw new Exception("Unable to determine compilation platform, must specify valid COMPILE_TARGETS!") } // Make sure JDK_HOME/bin/java exists if (!file(JAVA).exists()) throw new Exception("Missing or incorrect path to 'java': '$JAVA'. Perhaps bad JDK_HOME? $JDK_HOME") - if (!file(JIGSAW_JAVA).exists()) logger.warn("Missing or incorrect path to JIGSAW 'java': '$JIGSAW_JAVA'. Perhaps bad JIGSAW_HOME? $JIGSAW_HOME") if (!file(JAVAC).exists()) throw new Exception("Missing or incorrect path to 'javac': '$JAVAC'. Perhaps bad JDK_HOME? $JDK_HOME") - if (!file(JIGSAW_JAVAC).exists()) logger.warn("Missing or incorrect path to JIGSAW 'javac': '$JIGSAW_JAVAC'. Perhaps bad JIGSAW_HOME? $JIGSAW_HOME") if (!file(JAVAH).exists()) throw new Exception("Missing or incorrect path to 'javah': '$JAVAH'. Perhaps bad JDK_HOME? $JDK_HOME") if (!file(JAVADOC).exists()) throw new Exception("Missing or incorrect path to 'javadoc': '$JAVADOC'. Perhaps bad JDK_HOME? $JDK_HOME") // Determine the verion of Java in JDK_HOME. It looks like this: // --- 1017,1027 ----
*** 863,889 **** 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 2.11 is in use, error if < 2.11. ! if (gradle.gradleVersion != "2.11") { def ver = gradle.gradleVersion.split("[\\.]"); def gradleMajor = Integer.parseInt(ver[0]); def gradleMinor = Integer.parseInt(ver[1]); def err = ""; ! if (gradleMajor == 1 || gradleMajor == 2 && gradleMinor < 11) { ! err = "Gradle version too old: ${gradle.gradleVersion}; must be at least 2.11" } if (IS_GRADLE_VERSION_CHECK && err != "") { fail(err); } logger.warn("*****************************************************************"); logger.warn("Unsupported gradle version $gradle.gradleVersion in use."); ! logger.warn("Only version 2.11 is supported. Use this version at your own risk"); if ( err != "") logger.warn(err); logger.warn("*****************************************************************"); } /****************************************************************************** --- 1063,1089 ---- 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 3.1, error if < 3.0. ! if (gradle.gradleVersion != "3.1") { def ver = gradle.gradleVersion.split("[\\.]"); def gradleMajor = Integer.parseInt(ver[0]); def gradleMinor = Integer.parseInt(ver[1]); def err = ""; ! if (gradleMajor < 3) { ! err = "Gradle version too old: ${gradle.gradleVersion}; must be at least 3.0" } if (IS_GRADLE_VERSION_CHECK && err != "") { fail(err); } logger.warn("*****************************************************************"); logger.warn("Unsupported gradle version $gradle.gradleVersion in use."); ! logger.warn("Only version 3.1 is supported. Use this version at your own risk"); if ( err != "") logger.warn(err); logger.warn("*****************************************************************"); } /******************************************************************************
*** 898,908 **** 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("JIGSAW_HOME: $JIGSAW_HOME") logger.quiet("java.runtime.version: ${javaRuntimeVersion}") logger.quiet("java version: ${javaVersion}") logger.quiet("java build number: ${javaBuildNumber}") logger.quiet("jdk.runtime.version: ${jdkRuntimeVersion}") logger.quiet("jdk version: ${jdkVersion}") --- 1098,1107 ----
*** 972,991 **** project.assemble.dependsOn(nativeTask) if (project.hasProperty("cleanNativeAllTask")) project.cleanNativeAllTask.dependsOn cleanTask // Each of the different compile targets will be placed in a sub directory // of these root dirs, with the name of the dir being the name of the target - def headerRootDir = project.file("$project.buildDir/gensrc/headers/$name") def nativeRootDir = project.file("$project.buildDir/native/$name") def libRootDir = project.file("$project.buildDir/libs/$name") // For each compile target, create a javah / cc / link triplet compileTargets { t -> def targetProperties = project.rootProject.ext[t.upper] def library = targetProperties.library def properties = targetProperties.get(name) def nativeDir = file("$nativeRootDir/${t.name}") ! def headerDir = file("$headerRootDir/${t.name}") // If there is not a library clause in the properties, assume it is not wanted if (!targetProperties.containsKey(name)) { println("Ignoring native library ${name}. Not defined in ${t.name} project properties"); return --- 1171,1189 ---- project.assemble.dependsOn(nativeTask) if (project.hasProperty("cleanNativeAllTask")) project.cleanNativeAllTask.dependsOn cleanTask // Each of the different compile targets will be placed in a sub directory // of these root dirs, with the name of the dir being the name of the target def nativeRootDir = project.file("$project.buildDir/native/$name") def libRootDir = project.file("$project.buildDir/libs/$name") // For each compile target, create a javah / cc / link triplet compileTargets { t -> def targetProperties = project.rootProject.ext[t.upper] def library = targetProperties.library def properties = targetProperties.get(name) def nativeDir = file("$nativeRootDir/${t.name}") ! def headerDir = file("${project.buildDir}/gensrc/headers/${project.moduleName}") // If there is not a library clause in the properties, assume it is not wanted if (!targetProperties.containsKey(name)) { println("Ignoring native library ${name}. Not defined in ${t.name} project properties"); return
*** 997,1030 **** if (disabled) { println("Native library ${name} disabled in ${t.name} project properties"); return } - 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 - include(properties.javahInclude) - cleanTask.delete headerDir - } - def variants = properties.containsKey("variants") ? properties.variants : [""]; variants.each { variant -> def variantProperties = variant == "" ? properties : properties.get(variant) def capitalVariant = variant.capitalize() def ccOutput = variant == "" ? nativeDir : file("$nativeDir/$variant") ! def ccTask = project.task("cc${t.capital}$capitalName$capitalVariant", type: CCTask, dependsOn: javahTask, group: "Build") { description = "Compiles native sources for ${name} for ${t.name}${capitalVariant != '' ? ' for variant ' + capitalVariant : ''}" matches = ".*\\.c|.*\\.cpp|.*\\.m|.*\\.cc" headers = headerDir output(ccOutput) params.addAll(variantProperties.ccFlags) --- 1195,1210 ---- if (disabled) { println("Native library ${name} disabled in ${t.name} project properties"); return } def variants = properties.containsKey("variants") ? properties.variants : [""]; variants.each { variant -> def variantProperties = variant == "" ? properties : properties.get(variant) def capitalVariant = variant.capitalize() def ccOutput = variant == "" ? nativeDir : file("$nativeDir/$variant") ! def ccTask = project.task("cc${t.capital}$capitalName$capitalVariant", type: CCTask, group: "Build") { description = "Compiles native sources for ${name} for ${t.name}${capitalVariant != '' ? ' for variant ' + capitalVariant : ''}" matches = ".*\\.c|.*\\.cpp|.*\\.m|.*\\.cc" headers = headerDir output(ccOutput) params.addAll(variantProperties.ccFlags)
*** 1040,1050 **** linker = variantProperties.linker cleanTask.delete "$libRootDir/${t.name}" } nativeTask.dependsOn(linkTask) if (IS_WINDOWS && t.name == "win") { ! def rcTask = project.task("rc$capitalName$capitalVariant", type: CompileResourceTask, dependsOn: javahTask, group: "Build") { description = "Compiles native sources for $name" matches = ".*\\.rc" compiler = variantProperties.rcCompiler source(variantProperties.rcSource) if (variantProperties.rcFlags) { --- 1220,1230 ---- linker = variantProperties.linker cleanTask.delete "$libRootDir/${t.name}" } nativeTask.dependsOn(linkTask) if (IS_WINDOWS && t.name == "win") { ! def rcTask = project.task("rc$capitalName$capitalVariant", type: CompileResourceTask, group: "Build") { description = "Compiles native sources for $name" matches = ".*\\.rc" compiler = variantProperties.rcCompiler source(variantProperties.rcSource) if (variantProperties.rcFlags) {
*** 1056,1114 **** } } def useLipo = targetProperties.containsKey('useLipo') ? targetProperties.useLipo : false if (useLipo) { ! def lipoTask = project.task("lipo${t.capital}$capitalName", type: LipoTask, dependsOn: javahTask, group: "Build") { description = "Creates native fat library for $name for ${t.name}" libDir = file("$libRootDir/${t.name}") lib = file("$libRootDir/${t.name}/${library(properties.lib)}") } nativeTask.dependsOn(lipoTask) } } } ! 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) + project.files(project.sourceSets.jslc.output.classesDir) + project.configurations.antlr source = [project.file("src/main/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-compilers/$lowerName") } ! def generateShaders = project.task("generate${name}Shaders", dependsOn: compileCompilers) { description = "Generate $name shaders from JSL" def sourceDir = project.file("src/main/jsl-$lowerName") def destinationDir = project.file("$project.buildDir/gensrc/jsl-$lowerName") inputs.dir sourceDir outputs.dir destinationDir doLast { compile(sourceDir, destinationDir) } } ! def compileHLSLShaders = project.task("compile${name}HLSLShaders", dependsOn: generateShaders, type: CompileHLSLTask) { enabled = IS_WINDOWS description = "Compile $name HLSL files into .obj files" matches = ".*\\.hlsl" output project.file("$project.buildDir/hlsl/$name/$pkg") source project.file("$project.buildDir/gensrc/jsl-$lowerName/$pkg") } ! def processShaders = project.task("process${name}Shaders", dependsOn: [generateShaders, compileHLSLShaders], type: Copy, description: "Copy hlsl / frag shaders to build/resources/jsl-$lowerName") { from("$project.buildDir/hlsl/$name") { include "**/*.obj" } from("$project.buildDir/gensrc/jsl-$lowerName") { include("**/*.frag") } ! into project.sourceSets.main.output.resourcesDir } project.processShaders.dependsOn(processShaders) project.sourceSets.shaders.output.dir("$project.buildDir/gensrc/jsl-$lowerName", builtBy: processShaders ) --- 1236,1308 ---- } } def useLipo = targetProperties.containsKey('useLipo') ? targetProperties.useLipo : false if (useLipo) { ! def lipoTask = project.task("lipo${t.capital}$capitalName", type: LipoTask, group: "Build") { description = "Creates native fat library for $name for ${t.name}" libDir = file("$libRootDir/${t.name}") lib = file("$libRootDir/${t.name}/${library(properties.lib)}") } nativeTask.dependsOn(lipoTask) } } } ! void addJSL(Project project, String name, String pkg, List<String> addExports, 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) + project.files(project.sourceSets.jslc.output.classesDir) + project.configurations.antlr source = [project.file("src/main/jsl-$lowerName")] destinationDir = project.file("$project.buildDir/classes/jsl-compilers/$lowerName") + + if (addExports != null) { + options.compilerArgs.addAll(addExports) + } } ! def generateShaders = project.task("generate${name}Shaders", ! dependsOn: compileCompilers) { description = "Generate $name shaders from JSL" def sourceDir = project.file("src/main/jsl-$lowerName") def destinationDir = project.file("$project.buildDir/gensrc/jsl-$lowerName") inputs.dir sourceDir outputs.dir destinationDir doLast { compile(sourceDir, destinationDir) } } ! def compileHLSLShaders = project.task("compile${name}HLSLShaders", ! dependsOn: generateShaders, ! type: CompileHLSLTask) { enabled = IS_WINDOWS description = "Compile $name HLSL files into .obj files" matches = ".*\\.hlsl" output project.file("$project.buildDir/hlsl/$name/$pkg") source project.file("$project.buildDir/gensrc/jsl-$lowerName/$pkg") } ! def processShaders = project.task("process${name}Shaders", ! dependsOn: [generateShaders, compileHLSLShaders], ! type: Copy, ! description: "Copy hlsl / frag shaders to build/resources/jsl-$lowerName") { from("$project.buildDir/hlsl/$name") { include "**/*.obj" } from("$project.buildDir/gensrc/jsl-$lowerName") { include("**/*.frag") } ! //into project.sourceSets.main.output.resourcesDir ! into project.moduleDir } project.processShaders.dependsOn(processShaders) project.sourceSets.shaders.output.dir("$project.buildDir/gensrc/jsl-$lowerName", builtBy: processShaders )
*** 1162,1191 **** } } } } - // Task to check whether jfxrt.jar is present in the JDK - task checkJfxrtJar { - doLast { - // The following path is correct when using 8u as boot jdk - def jfxrtFile = new File("$JDK_HOME/jre/lib/ext/jfxrt.jar"); - if (jfxrtFile.exists()) { - fail("$jfxrtFile must be removed before building sdk") - } - // The following path is correct when using 9 (pre-jigsaw) as boot jdk - jfxrtFile = new File("$JDK_HOME/lib/jfxrt.jar"); - if (jfxrtFile.exists()) { - fail("$jfxrtFile must be removed before building sdk") - } - } - } - task updateCacheIfNeeded() { // an empty task we can add to as needed for UPDATE_STUB_CACHE } /***************************************************************************** * Project definitions (dependencies, etc) * *****************************************************************************/ void addJCov(p, test) { --- 1356,1374 ---- } } } } task updateCacheIfNeeded() { // an empty task we can add to as needed for UPDATE_STUB_CACHE } + task createTestArgfiles { + // an empty task we can add to as needed + } + + /***************************************************************************** * Project definitions (dependencies, etc) * *****************************************************************************/ void addJCov(p, test) {
*** 1238,1250 **** if (project.path.startsWith(":apps")) { // Lets handle the apps tree differently, as it is a collection of ant builds, // and the ant importer collides with the 'apply plugin:java' return } // All of our projects are java projects apply plugin: "java" ! sourceCompatibility = 1.8 // Setup the repositories that we'll download libraries from. Maven Central is // just easy for most things. The custom "ivy" repo is for downloading SWT. The way it // works is to setup the download URL such that it will resolve to the actual jar file // to download. See SWT_FILE_NAME for the name of the jar that will be used as the --- 1421,1435 ---- if (project.path.startsWith(":apps")) { // Lets handle the apps tree differently, as it is a collection of ant builds, // and the ant importer collides with the 'apply plugin:java' return } + // All of our projects are java projects + apply plugin: "java" ! sourceCompatibility = 1.9 // Setup the repositories that we'll download libraries from. Maven Central is // just easy for most things. The custom "ivy" repo is for downloading SWT. The way it // works is to setup the download URL such that it will resolve to the actual jar file // to download. See SWT_FILE_NAME for the name of the jar that will be used as the
*** 1271,1286 **** testCompile name: "jcov" } } compileJava.dependsOn verifyJava - compileJava.dependsOn checkJfxrtJar - - // Compile and run tests against the jfxrt.jar in the built sdk of the host machine - def sdkDir = "${rootProject.buildDir}/sdk" - def jfxrtJar = "$sdkDir/lib/jfxrt.jar" - def testJfxrtJar = DO_BUILD_SDK_FOR_TEST ? jfxrtJar : jfxrtJarFromSdk // At the moment the ASM library shipped with Gradle that is used to // discover the different test classes fails on Java 8, so in order // to have sourceCompatibility set to 1.8 I have to also turn scanForClasses off // and manually specify the includes / excludes. At the moment we use --- 1456,1465 ----
*** 1293,1368 **** scanForTestClasses = false; include("**/*Test.*"); if (BUILD_CLOSED && DO_JCOV) { addJCov(project, test) } ! classpath = files(testJfxrtJar) + classpath if (IS_HEADLESS_TEST) { systemProperty 'glass.platform', 'Monocle' systemProperty 'monocle.platform', 'Headless' systemProperty 'prism.order', 'sw' systemProperty 'com.sun.javafx.gestures.zoom', 'true' systemProperty 'com.sun.javafx.gestures.rotate', 'true' systemProperty 'com.sun.javafx.gestures.scroll', 'true' } systemProperty 'unstable.test', IS_UNSTABLE_TEST - - if (project.hasProperty("EXTRA_TEST_ARGS")) { - jvmArgs EXTRA_TEST_ARGS.split(' ') - } } compileTestJava { - classpath = files(testJfxrtJar) + classpath - } - - // Exclude any non-public-API classes from having javadoc generated. This block is used - // when generating JavaDocs for a specific project. When generating the JavaDocs for the - // entire SDK, a different javadoc command is used (see the javadoc task on the top level) - javadoc { - enabled = IS_BUILD_JAVADOC - exclude("com/**/*", "Compile*", "javafx/builder/**/*", "javafx/scene/accessibility/**/*"); - executable = JAVADOC; - options.windowTitle("JavaFX Project ${project.name} ${RELEASE_VERSION}") - if (BUILD_CLOSED) { - options.linksOffline(JDK_DOCS, JDK_DOCS_CLOSED); - } else { - options.links(JDK_DOCS); - } - options.addBooleanOption("XDignore.symbol.file").setValue(true); - options.addBooleanOption("Xdoclint:none").setValue(!IS_DOC_LINT); - options.addBooleanOption("javafx").setValue(true); - options.addBooleanOption("use").setValue(true); - // All doc-files are located in src/main/docs because Gradle's javadoc doesn't copy - // over the doc-files if they are embedded with the sources. I find this arrangement - // somewhat cleaner anyway (never was a fan of mixing javadoc files with the sources) - doLast { - copy { - from "src/main/docs" - into "$buildDir/docs/javadoc" - } - } } } // The "base" project is our first module and the most basic one required for // all other modules. It is useful even for non-GUI applications. project(":base") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.base" ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, null, ! null, testInclude, ! project.projectDir.path + "/src/test/addExports" ! ) dependencies { } // We need to take the VersionInfo.java file and replace the various // properties within it def replacements = [ "BUILD_TIMESTAMP": BUILD_TIMESTAMP, "HUDSON_JOB_NAME": HUDSON_JOB_NAME, --- 1472,1544 ---- scanForTestClasses = false; include("**/*Test.*"); if (BUILD_CLOSED && DO_JCOV) { addJCov(project, test) } ! if (IS_HEADLESS_TEST) { systemProperty 'glass.platform', 'Monocle' systemProperty 'monocle.platform', 'Headless' systemProperty 'prism.order', 'sw' systemProperty 'com.sun.javafx.gestures.zoom', 'true' systemProperty 'com.sun.javafx.gestures.rotate', 'true' systemProperty 'com.sun.javafx.gestures.scroll', 'true' } systemProperty 'unstable.test', IS_UNSTABLE_TEST } compileTestJava { } } + // These strings define the module-source-path to be used in compilation. + // They need to contain the full paths to the sources and the * will be + // used to infer the module name that is used. + project.ext.defaultModuleSourcePath = + cygpath(rootProject.projectDir.path + '/modules/*/src/main/java') + + File.pathSeparator + + cygpath(rootProject.projectDir.path + '/modules/*/build/gensrc/{java,jsl-decora,jsl-prism}') + + // graphics pass one + project.ext.defaultModuleSourcePath_GraphicsOne = + cygpath(rootProject.projectDir.path + '/modules/*/src/main/java') + + File.pathSeparator + + cygpath(rootProject.projectDir.path + '/modules/*/build/gensrc/{java,jsl-decora,jsl-prism}') + + // web pass one + project.ext.defaultModuleSourcePath_WebOne = + cygpath(rootProject.projectDir.path + '/modules/*/src/main/java') + + // Compiling the test shim files too. + project.ext.defaultModuleSourcePathShim = + cygpath(rootProject.projectDir.path + '/modules/*/src/{main,shims}/java') + + File.pathSeparator + + cygpath(rootProject.projectDir.path + '/modules/*/build/gensrc/{java,jsl-decora,jsl-prism}') + // The "base" project is our first module and the most basic one required for // all other modules. It is useful even for non-GUI applications. project(":base") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.base" ! sourceSets { ! main ! shims ! test ! } dependencies { + testCompile group: "junit", name: "junit", version: "4.8.2" } + commonModuleSetup(project, [ 'base' ]) + + project.ext.moduleSourcePath = defaultModuleSourcePath + project.ext.moduleSourcePathShim = defaultModuleSourcePathShim + // We need to take the VersionInfo.java file and replace the various // properties within it def replacements = [ "BUILD_TIMESTAMP": BUILD_TIMESTAMP, "HUDSON_JOB_NAME": HUDSON_JOB_NAME,
*** 1381,1393 **** } line } } ! if (IS_COMPILE_JFR) { ! sourceSets.main.java.srcDirs += "src/main/java-jfr" ! } // Make sure to include $buildDir/gensrc/java that we previously created. // We DO NOT want to include src/main/version-info sourceSets.main.java.srcDirs += "$buildDir/gensrc/java" --- 1557,1569 ---- } line } } ! // if (IS_COMPILE_JFR) { ! // sourceSets.main.java.srcDirs += "src/main/java-jfr" ! // } // Make sure to include $buildDir/gensrc/java that we previously created. // We DO NOT want to include src/main/version-info sourceSets.main.java.srcDirs += "$buildDir/gensrc/java"
*** 1399,1442 **** // the base module and includes the scene graph, layout, css, prism, windowing, etc. // This is a fairly complicated module. There are many different types of native components // that all need to be compiled. project(":graphics") { ! apply plugin: 'antlr' sourceSets { - antlr // antlr sources for JSLC jslc // JSLC gramar subset main shaders // generated shaders (prism & decora) test stub } - project.ext.buildModule = true - project.ext.moduleRuntime = true - project.ext.moduleName = "javafx.graphics" - - Set<String> testInclude = [ "test/**" ] - configureJigsawTests(project, [ "base" ], - null, testInclude, - project.projectDir.path + "/src/test/addExports" - ) - dependencies { ! compile project(":base") ! stubCompile group: "junit", name: "junit", version: "4.8.2", ! project(":base").sourceSets.test.output, sourceSets.main.output ! ! jslcCompile group: "org.antlr", name: "antlr-complete", version: "3.5.2" antlr group: "org.antlr", name: "antlr-complete", version: "3.5.2" } ! compileJslcJava.dependsOn(generateGrammarSource) ! compileJava.dependsOn(compileJslcJava) /* Graphics compilation is "complicated" by the generated shaders. We have two shader groups - Decora and Prism. --- 1575,1615 ---- // the base module and includes the scene graph, layout, css, prism, windowing, etc. // This is a fairly complicated module. There are many different types of native components // that all need to be compiled. project(":graphics") { ! project.ext.buildModule = true ! project.ext.moduleRuntime = true ! project.ext.moduleName = "javafx.graphics" ! ! getConfigurations().create("antlr"); sourceSets { jslc // JSLC gramar subset main + shims shaders // generated shaders (prism & decora) test stub } dependencies { ! stubCompile group: "junit", name: "junit", version: "4.8.2" antlr group: "org.antlr", name: "antlr-complete", version: "3.5.2" } ! project.ext.moduleSourcePath = defaultModuleSourcePath_GraphicsOne ! project.ext.moduleSourcePathShim = defaultModuleSourcePathShim ! ! commonModuleSetup(project, [ 'base', 'graphics' ]) + List<String> decoraAddExports = [ + '--add-exports=javafx.graphics/com.sun.scenario.effect=ALL-UNNAMED', + '--add-exports=javafx.graphics/com.sun.scenario.effect.light=ALL-UNNAMED', + '--add-exports=javafx.graphics/com.sun.scenario.effect.impl.state=ALL-UNNAMED' + ] /* Graphics compilation is "complicated" by the generated shaders. We have two shader groups - Decora and Prism.
*** 1454,1469 **** --- 1627,1683 ---- project.task("processShaders") { // an empty task to hang the prism and decora shaders on } + // Generate the JSLC support grammar + project.task("generateGrammarSource", type: JavaExec) { + // use antlr to generate our grammar. + // note: the antlr plugin creates some issues with the other compiles + // so we will do this by hand + + File wd = file(project.projectDir.path + "/src/jslc/antlr") + + executable = JAVA + classpath = project.configurations.antlr + workingDir = wd + main = "org.antlr.Tool" + + args = [ + "-o", + "$buildDir/gensrc/antlr", + "com/sun/scenario/effect/compiler/JSL.g" ] + + inputs.dir wd + outputs.dir file("$buildDir/gensrc/antlr") + } + sourceSets.jslc.java.srcDirs += "$buildDir/gensrc/antlr" + + // and compile the JSLC support classes + compileJslcJava.dependsOn(generateGrammarSource) + compileJslcJava.classpath = project.configurations.antlr + + compileJava.dependsOn(compileJslcJava) + + // this task is the "second pass" compile of all of the module classes project.task("compileFullJava", type: JavaCompile, dependsOn: processShaders) { description = "Compile all of the graphics java classes - main and shaders" + classpath = configurations.compile + source = project.sourceSets.main.java.srcDirs + source += "$buildDir/gensrc/java" source += project.sourceSets.shaders.output + + project.sourceSets.shims.java.srcDirs += project.sourceSets.shaders.output + destinationDir = project.sourceSets.main.output.classesDir + options.compilerArgs.addAll([ + '-h', "$buildDir/gensrc/headers/", // Note: this creates the native headers + '-implicit:none', + '--module-source-path', defaultModuleSourcePath + ] ) } classes.dependsOn(compileFullJava) // Create a single "native" task which will depend on all the individual native tasks for graphics project.ext.nativeAllTask = task("native", group: "Build", description: "Compiles and Builds all native libraries for Graphics");
*** 1485,1495 **** if (IS_WINDOWS) { addNative(project, "prismD3D") // TODO need to hook this up to be executed only if PassThroughVS.h is missing or PassThroughVS.hlsl is changed task generateD3DHeaders(group: "Build") { enabled = IS_WINDOWS - dependsOn javahWinPrismD3D inputs.file "src/main/native-prism-d3d/hlsl/Mtl1PS.hlsl" inputs.file "src/main/native-prism-d3d/hlsl/Mtl1VS.hlsl" inputs.file "src/main/native-prism-d3d/PassThroughVS.hlsl" outputs.dir "$buildDir/headers/PrismD3D/" outputs.dir "$buildDir/headers/PrismD3D/hlsl/" --- 1699,1708 ----
*** 1593,1603 **** // The native library must be copied over during SDK creation time in the "sdk" task. In // addition to these steps, the clean task is created. Note that I didn't bother to create // a new task for each of the decora files, preferring instead just to create a rule?? Also // need "clean" tasks for each compile task. ! addJSL(project, "Decora", "com/sun/scenario/effect/impl/hw/d3d/hlsl") { sourceDir, destinationDir -> [[fileName: "ColorAdjust", generator: "CompileJSL", outputs: "-all"], [fileName: "Brightpass", generator: "CompileJSL", outputs: "-all"], [fileName: "SepiaTone", generator: "CompileJSL", outputs: "-all"], [fileName: "PerspectiveTransform", generator: "CompileJSL", outputs: "-all"], [fileName: "DisplacementMap", generator: "CompileJSL", outputs: "-all"], --- 1806,1816 ---- // The native library must be copied over during SDK creation time in the "sdk" task. In // addition to these steps, the clean task is created. Note that I didn't bother to create // a new task for each of the decora files, preferring instead just to create a rule?? Also // need "clean" tasks for each compile task. ! addJSL(project, "Decora", "com/sun/scenario/effect/impl/hw/d3d/hlsl", decoraAddExports) { sourceDir, destinationDir -> [[fileName: "ColorAdjust", generator: "CompileJSL", outputs: "-all"], [fileName: "Brightpass", generator: "CompileJSL", outputs: "-all"], [fileName: "SepiaTone", generator: "CompileJSL", outputs: "-all"], [fileName: "PerspectiveTransform", generator: "CompileJSL", outputs: "-all"], [fileName: "DisplacementMap", generator: "CompileJSL", outputs: "-all"],
*** 1616,1647 **** //classpath += files(project.sourceSets.jslc.resources) // not quite right.. classpath += files("${project.projectDir}/src/jslc/resources") 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"] } } } - task generateDecoraNativeHeaders(type: JavaHeaderTask, dependsOn: compileFullJava) { - description = "Generates JNI Headers for Decora SSE Natives" - source file("$buildDir/classes/main") - include("com/sun/scenario/effect/impl/sw/sse/*"); - classpath = files("$buildDir/classes/main") - classpath += files(project.sourceSets.jslc.output.classesDir) - output = file("$buildDir/gensrc/headers/jsl-decora") - } task nativeDecora(dependsOn: compileDecoraHLSLShaders, group: "Build") { description = "Generates JNI headers, compiles, and builds native dynamic library for Decora" } task cleanNativeDecora(type: Delete, group: "Build") { description = "Clean native objects for Decora" } ! def headerDir = file("$buildDir/gensrc/headers/jsl-decora") def nativeRootDir = project.file("$project.buildDir/native/jsl-decora") def libRootDir = project.file("$project.buildDir/libs/jsl-decora") // For each compile target, create cc and link tasks compileTargets { t -> def target = t.name --- 1829,1853 ---- //classpath += files(project.sourceSets.jslc.resources) // not quite right.. classpath += files("${project.projectDir}/src/jslc/resources") classpath += files("$buildDir/classes/main") classpath += files("$buildDir/classes/jsl-compilers/decora") ! jvmArgs += decoraAddExports ! args += ["-i", sourceDir, "-o", destinationDir, "-t", "-pkg", "com/sun/scenario/effect", "$settings.outputs", "$settings.fileName"] } } } task nativeDecora(dependsOn: compileDecoraHLSLShaders, group: "Build") { description = "Generates JNI headers, compiles, and builds native dynamic library for Decora" } task cleanNativeDecora(type: Delete, group: "Build") { description = "Clean native objects for Decora" } ! def headerDir = file("$buildDir/gensrc/headers/javafx.graphics") def nativeRootDir = project.file("$project.buildDir/native/jsl-decora") def libRootDir = project.file("$project.buildDir/libs/jsl-decora") // For each compile target, create cc and link tasks compileTargets { t -> def target = t.name
*** 1656,1666 **** variants.each { variant -> def variantProperties = variant == "" ? properties : properties.get(variant) def capitalVariant = variant.capitalize() def ccOutput = variant == "" ? nativeDir : file("$nativeDir/$variant") ! def ccTask = task("compileDecoraNativeShaders$capitalTarget$capitalVariant", type: CCTask, dependsOn: generateDecoraNativeHeaders) { description = "Compiles Decora SSE natives for ${t.name}${capitalVariant != '' ? ' for variant ' + capitalVariant : ''}" matches = ".*\\.cc" source file("$buildDir/gensrc/jsl-decora") source file(project.projectDir.path + "/src/main/native-decora") headers = headerDir --- 1862,1872 ---- variants.each { variant -> def variantProperties = variant == "" ? properties : properties.get(variant) def capitalVariant = variant.capitalize() def ccOutput = variant == "" ? nativeDir : file("$nativeDir/$variant") ! def ccTask = task("compileDecoraNativeShaders$capitalTarget$capitalVariant", type: CCTask ) { description = "Compiles Decora SSE natives for ${t.name}${capitalVariant != '' ? ' for variant ' + capitalVariant : ''}" matches = ".*\\.cc" source file("$buildDir/gensrc/jsl-decora") source file(project.projectDir.path + "/src/main/native-decora") headers = headerDir
*** 1678,1688 **** linker = variantProperties.linker cleanNativeDecora.delete "$libRootDir/$t.name/" } if (IS_WINDOWS && target == "win") { ! def rcTask = project.task("rcDecoraNativeShaders$capitalTarget$capitalVariant", type: CompileResourceTask, dependsOn: generateDecoraNativeHeaders) { description = "Compiles native sources for Decora SSE" matches = ".*\\.rc" compiler = variantProperties.rcCompiler source(variantProperties.rcSource) if (variantProperties.rcFlags) { --- 1884,1894 ---- linker = variantProperties.linker cleanNativeDecora.delete "$libRootDir/$t.name/" } if (IS_WINDOWS && target == "win") { ! def rcTask = project.task("rcDecoraNativeShaders$capitalTarget$capitalVariant", type: CompileResourceTask) { description = "Compiles native sources for Decora SSE" matches = ".*\\.rc" compiler = variantProperties.rcCompiler source(variantProperties.rcSource) if (variantProperties.rcFlags) {
*** 1696,1706 **** nativeDecora.dependsOn(linkTask) } } // Prism JSL ! addJSL(project, "Prism", "com/sun/prism/d3d/hlsl") { sourceDir, destinationDir -> def inputFiles = fileTree(dir: sourceDir) inputFiles.include "**/*.jsl" inputFiles.each { file -> javaexec { executable = JAVA --- 1902,1912 ---- nativeDecora.dependsOn(linkTask) } } // Prism JSL ! addJSL(project, "Prism", "com/sun/prism/d3d/hlsl", null) { sourceDir, destinationDir -> def inputFiles = fileTree(dir: sourceDir) inputFiles.include "**/*.jsl" inputFiles.each { file -> javaexec { executable = JAVA
*** 1774,1792 **** project(":controls") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.controls" ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, [ "base", "graphics" ], ! null, testInclude, ! project.projectDir.path + "/src/test/addExports" ! ) dependencies { - compile project(":base"), project(":graphics") - // TODO not sure how to specify this? processResources project(":base"), project(":graphics") testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output } test { --- 1980,2001 ---- project(":controls") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.controls" ! sourceSets { ! main ! shims ! test ! } ! ! project.ext.moduleSourcePath = defaultModuleSourcePath ! project.ext.moduleSourcePathShim = defaultModuleSourcePathShim ! ! commonModuleSetup(project, [ 'base', 'graphics', 'controls' ]) dependencies { testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output } test {
*** 1795,1821 **** "-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", ! "$buildDir/resources/main/com/sun/javafx/scene/control/skin/caspian/highcontrast.css", ! "$buildDir/resources/main/com/sun/javafx/scene/control/skin/modena/modena.css", ! "$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 = project.projectDir ! classpath files("$buildDir/classes/main", ! project(":graphics").sourceSets.main.output, ! project(":base").sourceSets.main.output) main = "com.sun.javafx.css.parser.Css2Bin" args css } } } --- 2004,2028 ---- "-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 the runtime modules at all processResources << { ! ["$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/caspian/caspian-no-transparency.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/caspian/embedded.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/caspian/fxvk.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/caspian/highcontrast.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/modena/modena-no-transparency.css", ! "$moduleDir/com/sun/javafx/scene/control/skin/modena/touch.css"].each { css -> javaexec { executable = JAVA workingDir = project.projectDir ! jvmArgs += patchModuleArgs main = "com.sun.javafx.css.parser.Css2Bin" args css } } }
*** 1829,1847 **** */ project.ext.buildModule = COMPILE_SWING project.ext.moduleRuntime = true project.ext.moduleName = "javafx.swing" ! dependencies { ! compile project(":base"), project(":graphics") } ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, [ "base", "graphics", "controls" ], ! null, testInclude, ! null // no addExports ! ) test { enabled = IS_FULL_TEST && IS_AWT_TEST } } --- 2036,2058 ---- */ project.ext.buildModule = COMPILE_SWING project.ext.moduleRuntime = true project.ext.moduleName = "javafx.swing" ! sourceSets { ! main ! //shims // no test shims needed ! test } ! project.ext.moduleSourcePath = defaultModuleSourcePath ! project.ext.moduleSourcePathShim = defaultModuleSourcePathShim ! ! commonModuleSetup(project, [ 'base', 'graphics', 'swing' ]) ! ! dependencies { ! } test { enabled = IS_FULL_TEST && IS_AWT_TEST } }
*** 1852,1865 **** } // javafx.swt is an automatic module project.ext.buildModule = false dependencies { - compile project(":base"), project(":graphics") compile name: SWT_FILE_NAME } classes << { // Copy all of the download libraries to libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); File swtLib = new File(libsDir, "swt-debug.jar") libsDir.mkdirs(); --- 2063,2078 ---- } // javafx.swt is an automatic module project.ext.buildModule = false + commonModuleSetup(project, [ 'base', 'graphics' ]) + dependencies { compile name: SWT_FILE_NAME } + classes << { // Copy all of the download libraries to libs directory for the sake of the IDEs File libsDir = rootProject.file("build/libs"); File swtLib = new File(libsDir, "swt-debug.jar") libsDir.mkdirs();
*** 1879,1919 **** rename ".*swt.*jar", "swt-debug\\.jar" } } } test { ! if (IS_JIGSAW_TEST) { enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for swt") ! } else { ! enabled = IS_FULL_TEST && IS_SWT_TEST if (IS_MAC) { enabled = false logger.info("SWT tests are disabled on MAC, because Gradle test runner does not handle -XstartOnFirstThread properly (https://issues.gradle.org/browse/GRADLE-3290).") } } - } } project(":fxml") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.fxml" ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, [ "base", "graphics" ], ! null, testInclude, ! project.projectDir.path + "/src/test/addExports" ! ) dependencies { - compile project(":base"), - project(":graphics"), - project(":controls") testCompile project(":graphics").sourceSets.test.output } test { // StubToolkit is not *really* needed here, but because some code inadvertently invokes performance // tracker and this attempts to fire up the toolkit and this looks for native libraries and fails, // we have to use the stub toolkit for now. jvmArgs "-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit" --- 2092,2144 ---- rename ".*swt.*jar", "swt-debug\\.jar" } } } + compileJava.options.compilerArgs.addAll([ + "--add-exports=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED", + "--add-exports=javafx.graphics/com.sun.javafx.cursor=ALL-UNNAMED", + "--add-exports=javafx.graphics/com.sun.javafx.embed=ALL-UNNAMED", + "--add-exports=javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED", + "--add-exports=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED", + ]) + test { ! enabled = IS_FULL_TEST && IS_SWT_TEST ! enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for swt") ! if (IS_MAC) { enabled = false logger.info("SWT tests are disabled on MAC, because Gradle test runner does not handle -XstartOnFirstThread properly (https://issues.gradle.org/browse/GRADLE-3290).") } } } project(":fxml") { project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.fxml" ! sourceSets { ! main ! shims ! test ! } ! ! project.ext.moduleSourcePath = defaultModuleSourcePath ! project.ext.moduleSourcePathShim = defaultModuleSourcePathShim ! ! commonModuleSetup(project, [ 'base', 'graphics', 'swing', 'controls', 'fxml' ]) ! dependencies { testCompile project(":graphics").sourceSets.test.output + testCompile project(":base").sourceSets.test.output } + test { // StubToolkit is not *really* needed here, but because some code inadvertently invokes performance // tracker and this attempts to fire up the toolkit and this looks for native libraries and fails, // we have to use the stub toolkit for now. jvmArgs "-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit"
*** 1921,1980 **** classpath += files("$JDK_HOME/jre/lib/ext/nashorn.jar") } } project(":jmx") { ! project.ext.buildModule = false // true project.ext.moduleRuntime = false project.ext.moduleName = "javafx.jmx" dependencies { - compile project(":base") - compile project(":graphics") - compile project(":swing") - compile project(":media") } ! // Tests are disabled until RT-33926 can be fixed test.enabled = false ! if (!DO_BUILD_SDK_FOR_TEST) { ! def javafxMxJar = new File(TEST_SDK_DIR, "lib/javafx-mx.jar") ! [test, compileTestJava].each { ! it.classpath = files(javafxMxJar) + it.classpath ! } ! } } project(":fxpackagerservices") { project.ext.buildModule = COMPILE_FXPACKAGER project.ext.moduleRuntime = false project.ext.moduleName = "jdk.packager.services" tasks.all { if (!COMPILE_FXPACKAGER) it.enabled = false } test { - if (IS_JIGSAW_TEST) { enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for fxpackagerservices") } - } } project(":fxpackager") { project.ext.buildModule = COMPILE_FXPACKAGER project.ext.moduleRuntime = false project.ext.moduleName = "jdk.packager" manifest { attributes( "Main-Class": "com.sun.javafx.tools.packager.Main" ) } tasks.all { if (!COMPILE_FXPACKAGER) it.enabled = false } // fxpackager has a dependency on ant in order to build the ant jar, // and as such needs to point to the apache binary repository if (!BUILD_CLOSED) { repositories { maven { --- 2146,2245 ---- classpath += files("$JDK_HOME/jre/lib/ext/nashorn.jar") } } project(":jmx") { ! project.ext.buildModule = false project.ext.moduleRuntime = false project.ext.moduleName = "javafx.jmx" + + commonModuleSetup(project, [ 'base', 'graphics', 'swing', 'controls', 'media', 'jmx' ]) + dependencies { } ! // Tests are permanently disabled test.enabled = false ! compileJava.options.compilerArgs.addAll([ ! "--add-exports=javafx.graphics/com.sun.javafx.jmx=ALL-UNNAMED", ! "--add-exports=javafx.graphics/com.sun.scenario.animation=ALL-UNNAMED", ! "--add-exports=javafx.graphics/com.sun.scenario.animation.jmx=ALL-UNNAMED", ! "--add-exports=javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED", ! "--add-exports=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED", ! "--add-exports=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED", ! "--add-exports=javafx.media/com.sun.media.jfxmedia=ALL-UNNAMED", ! "--add-exports=javafx.media/com.sun.media.jfxmedia.events=ALL-UNNAMED", ! ]) } project(":fxpackagerservices") { project.ext.buildModule = COMPILE_FXPACKAGER project.ext.moduleRuntime = false project.ext.moduleName = "jdk.packager.services" + + sourceSets { + main + //shims // no test shims needed + test + } + + project.ext.moduleSourcePath = defaultModuleSourcePath + project.ext.moduleSourcePathShim = defaultModuleSourcePathShim + + commonModuleSetup(project, [ 'base', 'graphics', 'controls' ]) + tasks.all { if (!COMPILE_FXPACKAGER) it.enabled = false } + + compileTestJava.enabled = false // FIXME: JIGSAW -- support this with modules + test { enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for fxpackagerservices") } } project(":fxpackager") { project.ext.buildModule = COMPILE_FXPACKAGER project.ext.moduleRuntime = false project.ext.moduleName = "jdk.packager" + + sourceSets { + main + //shims // no test shims needed + test + } + + project.ext.moduleSourcePath = defaultModuleSourcePath + project.ext.moduleSourcePathShim = defaultModuleSourcePathShim + + commonModuleSetup(project, [ 'base', 'graphics', 'controls', 'fxpackagerservices', 'fxpackager' ]) + manifest { attributes( "Main-Class": "com.sun.javafx.tools.packager.Main" ) } + tasks.all { if (!COMPILE_FXPACKAGER) it.enabled = false } + sourceSets { + main + antplugin { + java { + compileClasspath += main.output + runtimeClasspath += main.output + } + } + test + } + // fxpackager has a dependency on ant in order to build the ant jar, // and as such needs to point to the apache binary repository if (!BUILD_CLOSED) { repositories { maven {
*** 1982,2010 **** } } } dependencies { ! compile group: "org.apache.ant", name: "ant", version: "1.8.2" ! compile project(":fxpackagerservices") ! testCompile project(":controls") } ! // When producing the jar, we need to relocate a few class files // from their normal location to a resources/classes or resources/web-files // location ! jar { includeEmptyDirs = false archiveName = "ant-javafx.jar" ! includes = ["com/sun/javafx/tools/ant/**", "com/javafx/main/**", "resources/web-files/**"] eachFile { FileCopyDetails details -> if (details.path.startsWith("com/javafx/main")) { details.path = "resources/classes/$details.path" } } } // The "man" task will create a $buildDir/man containing the man // files for the system being built task man(type: Copy) { includeEmptyDirs = false enabled = (IS_LINUX || IS_MAC) && COMPILE_FXPACKAGER --- 2247,2315 ---- } } } dependencies { ! antpluginCompile group: "org.apache.ant", name: "ant", version: "1.8.2" ! ! testCompile project(":controls"), ! group: "org.apache.ant", name: "ant", version: "1.8.2", ! sourceSets.antplugin.output ! } ! ! //Note: these should be reflected in the module-info additions passed to the JDK ! compileJava.options.compilerArgs.addAll([ ! "--add-exports=java.base/sun.security.timestamp=jdk.packager", ! "--add-exports=java.base/sun.security.x509=jdk.packager", ! "--add-exports=jdk.jdeps/com.sun.tools.jdeps=jdk.packager", ! "--add-exports=jdk.jlink/jdk.tools.jlink.internal.packager=jdk.packager", ! ! // Note: not in extras... ! "--add-exports=java.base/sun.security.pkcs=jdk.packager", ! "--add-exports=java.logging/java.util.logging=jdk.packager", ! ]) ! ! compileAntpluginJava.dependsOn([ compileJava, processResources ]) ! compileAntpluginJava.options.compilerArgs.addAll( ! computeModulePathArgs("antlib", project.moduleChain, false)) ! ! task buildVersionFile() { ! File dir = new File("${project.projectDir}/build/resources/antplugin/resources"); ! dir.mkdirs() ! File versionFile = new File(dir, "/version.properties"); ! if (!versionFile.exists()) { ! versionFile << "version=$RELEASE_VERSION\n" ! } ! outputs.file(versionFile) } ! // When producing the ant-javafx.jar, we need to relocate a few class files // from their normal location to a resources/classes or resources/web-files // location ! task antpluginJar(type: Jar, dependsOn: [ compileJava, jar, compileAntpluginJava, buildVersionFile ]) { includeEmptyDirs = false archiveName = "ant-javafx.jar" ! ! from (sourceSets.antplugin.output) { eachFile { FileCopyDetails details -> if (details.path.startsWith("com/javafx/main")) { details.path = "resources/classes/$details.path" } } } + from (sourceSets.main.resources) { + includes = [ "com/sun/javafx/tools/ant/antlib.xml" ] + } + + from (sourceSets.main.output.resourcesDir) { + includes = [ "resources/web-files/**" ] + } + } + + assemble.dependsOn(antpluginJar) + // The "man" task will create a $buildDir/man containing the man // files for the system being built task man(type: Copy) { includeEmptyDirs = false enabled = (IS_LINUX || IS_MAC) && COMPILE_FXPACKAGER
*** 2013,2022 **** --- 2318,2329 ---- exclude "**/*.html" if (IS_MAC) exclude "**/ja_JP.UTF-8/**" } processResources.dependsOn man + String buildClassesDir = "${sourceSets.main.output.classesDir}/${moduleName}" + // Compile the native launchers. These are included in jdk.packager.jmod. if (IS_WINDOWS && COMPILE_FXPACKAGER) { task buildWinLauncher(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher"; matches = "WinLauncher\\.cpp";
*** 2029,2039 **** 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"; --- 2336,2346 ---- doLast { copy { from "$buildDir/native/WinLauncher/WinLauncher.exe" from "$MSVCR" from "$MSVCP" ! into "${buildClassesDir}/main/com/oracle/tools/packager/windows" } } } task compileWinLibrary(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher library";
*** 2050,2060 **** 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"; --- 2357,2367 ---- lib = file("$buildDir/native/WinLauncher/packager.dll") linker = WIN.launcherlibrary.linker doLast { copy { from "$buildDir/native/WinLauncher/packager.dll" ! into "${buildClassesDir}/com/oracle/tools/packager/windows" } } } task buildWinLauncherSvc(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher";
*** 2066,2076 **** 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" --- 2373,2383 ---- exe = true; linkerOptions.addAll(WIN.launcher.linkFlags); doLast { copy { from "$buildDir/native/WinLauncherSvc/WinLauncherSvc.exe" ! into "${buildClassesDir}/com/oracle/tools/packager/windows" } } } task buildIconSwap(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher"
*** 2082,2092 **** 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 compileVersionInfoSwap(type: CCTask, group: "Build") { description = "Compiles native sources for the VersionInfoSwap tool"; --- 2389,2399 ---- exe = true linkerOptions.addAll(WIN.iconLauncher.linkFlags) doLast { copy { from "$buildDir/native/IconSwap/IconSwap.exe" ! into "${buildClassesDir}/com/oracle/tools/packager/windows" } } } task compileVersionInfoSwap(type: CCTask, group: "Build") { description = "Compiles native sources for the VersionInfoSwap tool";
*** 2103,2127 **** lib = file("$buildDir/native/VersionInfoSwap/VersionInfoSwap.exe") linker = WIN.versionInfoLauncher.linker doLast { copy { from "$buildDir/native/VersionInfoSwap/VersionInfoSwap.exe" ! into "$buildDir/classes/main/com/oracle/tools/packager/windows" } } } task compileLauncher(dependsOn: [buildWinLauncher, linkWinLibrary, buildWinLauncherSvc, buildIconSwap, linkVersionInfoSwap]) - jar.dependsOn compileLauncher; } else if (IS_MAC && COMPILE_FXPACKAGER) { task buildMacLauncher(type: CCTask, group: "Build") { 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")) ! outputs.file(file("$buildDir/classes/main/com/oracle/tools/packager/mac/JavaAppLauncher")) eachOutputFile = { f -> return new File(f.getParent(), "JavaAppLauncher") } } task compileMacLibrary(type: CCTask, group: "Build") { --- 2410,2433 ---- lib = file("$buildDir/native/VersionInfoSwap/VersionInfoSwap.exe") linker = WIN.versionInfoLauncher.linker doLast { copy { from "$buildDir/native/VersionInfoSwap/VersionInfoSwap.exe" ! into "${buildClassesDir}/com/oracle/tools/packager/windows" } } } task compileLauncher(dependsOn: [buildWinLauncher, linkWinLibrary, buildWinLauncherSvc, buildIconSwap, linkVersionInfoSwap]) } else if (IS_MAC && COMPILE_FXPACKAGER) { task buildMacLauncher(type: CCTask, group: "Build") { 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("${buildClassesDir}/com/oracle/tools/packager/mac")) ! outputs.file(file("${buildClassesDir}/main/com/oracle/tools/packager/mac/JavaAppLauncher")) eachOutputFile = { f -> return new File(f.getParent(), "JavaAppLauncher") } } task compileMacLibrary(type: CCTask, group: "Build") {
*** 2135,2148 **** 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") { description = "Compiles native sources for the application co-bundle launcher" matches = ".*\\.cpp" source file("src/main/native/launcher/linux") --- 2441,2453 ---- 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("${buildClassesDir}/com/oracle/tools/packager/mac/libpackager.dylib") } task compileLauncher(dependsOn: [buildMacLauncher, linkMacLibrary]) } else if (IS_LINUX && COMPILE_FXPACKAGER) { task compileLinuxLauncher(type: CCTask, group: "Build") { description = "Compiles native sources for the application co-bundle launcher" matches = ".*\\.cpp" source file("src/main/native/launcher/linux")
*** 2153,2163 **** 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") --- 2458,2468 ---- 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("${buildClassesDir}/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")
*** 2168,2181 **** 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; } // Builds the javapackager executable. For everything other than windows, // this is simply moving the existing shell script and ensuring it has proper // permissions. For Windows, this includes compiling the native executable --- 2473,2485 ---- 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("${buildClassesDir}/com/oracle/tools/packager/linux/libpackager.so") } task compileLauncher(dependsOn: [linkLinuxLauncher, linkLinuxLibrary]) } // Builds the javapackager executable. For everything other than windows, // this is simply moving the existing shell script and ensuring it has proper // permissions. For Windows, this includes compiling the native executable
*** 2242,2252 **** } } } } ! jar.dependsOn buildJavaPackager 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") --- 2546,2557 ---- } } } } ! assemble.dependsOn compileLauncher; ! assemble.dependsOn buildJavaPackager 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")
*** 2320,2340 **** [compileTestJava, test].each { it.classpath = files(antJavafxJar) + it.classpath } } test { - if (IS_JIGSAW_TEST) { enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for fxpackager") - } dependsOn packagerFXPackagedJar systemProperty "RETAIN_PACKAGER_TESTS", RETAIN_PACKAGER_TESTS systemProperty "TEST_PACKAGER_DMG", TEST_PACKAGER_DMG systemProperty "FULL_TEST", FULL_TEST ! executable = JIGSAW_JAVA; } def packagerDevOpts = [] try { packagerDevOpts.addAll(PACKAGER_DEV_OPTS.split(' ')) --- 2625,2644 ---- [compileTestJava, test].each { it.classpath = files(antJavafxJar) + it.classpath } } + compileTestJava.enabled = false // FIXME: JIGSAW -- support this with modules test { enabled = false // FIXME: JIGSAW -- support this with modules logger.info("JIGSAW Testing disabled for fxpackager") dependsOn packagerFXPackagedJar systemProperty "RETAIN_PACKAGER_TESTS", RETAIN_PACKAGER_TESTS systemProperty "TEST_PACKAGER_DMG", TEST_PACKAGER_DMG systemProperty "FULL_TEST", FULL_TEST ! executable = JAVA; } def packagerDevOpts = [] try { packagerDevOpts.addAll(PACKAGER_DEV_OPTS.split(' '))
*** 2342,2356 **** packagerDevOpts.addAll("image") } task packagerDev(dependsOn: [jar, testClasses, packagerFakeJar], type:JavaExec) { workingDir = project.file("build/tmp/tests/appResources/") ! executable = JIGSAW_JAVA classpath = project.files("build/libs/ant-javafx.jar", "build/classes/test", "build/resources/test") main = "hello.SimpleBundle" args = [ ! '--module-path', JIGSAW_MODULES, '-o', "$projectDir/build/dev", '-all', packagerDevOpts ].flatten() } --- 2646,2660 ---- packagerDevOpts.addAll("image") } task packagerDev(dependsOn: [jar, testClasses, packagerFakeJar], type:JavaExec) { workingDir = project.file("build/tmp/tests/appResources/") ! executable = JAVA classpath = project.files("build/libs/ant-javafx.jar", "build/classes/test", "build/resources/test") main = "hello.SimpleBundle" args = [ ! '--module-path', JDK_JMODS, '-o', "$projectDir/build/dev", '-all', packagerDevOpts ].flatten() }
*** 2360,2370 **** def sourceDir = "src/$projectDir" def buildDir = "build/$projectDir" doLast { exec { ! commandLine(JIGSAW_JAVAC) args("-d") args("$buildDir") args("$sourceDir/RedistributableFiles.java") } } --- 2664,2674 ---- def sourceDir = "src/$projectDir" def buildDir = "build/$projectDir" doLast { exec { ! commandLine(JAVAC) args("-d") args("$buildDir") args("$sourceDir/RedistributableFiles.java") } }
*** 2377,2387 **** def resourceDir = "build/resources/main/jdk/packager/internal/resources/tools/redistributable-files" doLast { def fxmodules = "" ! if (!file("$JIGSAW_MODULES/jdk.packager.jmod").exists()) { moduleProjList.each { project -> if (fxmodules.isEmpty()) { fxmodules = project.ext.moduleName } else { --- 2681,2691 ---- def resourceDir = "build/resources/main/jdk/packager/internal/resources/tools/redistributable-files" doLast { def fxmodules = "" ! if (!file("$JDK_JMODS/jdk.packager.jmod").exists()) { moduleProjList.each { project -> if (fxmodules.isEmpty()) { fxmodules = project.ext.moduleName } else {
*** 2389,2404 **** } } } exec { ! commandLine(JIGSAW_JAVA) args("-classpath") args("$buildDir") args("RedistributableFiles") args("--module-path") ! args("$JIGSAW_MODULES") args("--exclude-filelist") args("$sourceDir/exclude_modules.list") args("--out-file") args("$resourceDir/redistributable.list") --- 2693,2708 ---- } } } exec { ! commandLine(JAVA) args("-classpath") args("$buildDir") args("RedistributableFiles") args("--module-path") ! args("$JDK_JMODS") args("--exclude-filelist") args("$sourceDir/exclude_modules.list") args("--out-file") args("$resourceDir/redistributable.list")
*** 2421,2499 **** project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.media" dependencies { - compile project(":base"), project(":graphics") } compileJava.dependsOn updateCacheIfNeeded ! sourceSets { ! tools { ! java.srcDir "src/tools/java" ! } } compileToolsJava { enabled = IS_COMPILE_MEDIA ! classpath = sourceSets.main.output; } project.ext.makeJobsFlag = IS_WINDOWS && IS_DEBUG_NATIVE ? "-j1" : "-j5"; project.ext.buildType = IS_DEBUG_NATIVE ? "Debug" : "Release"; def nativeSrcDir = file("${projectDir}/src/main/native") ! def generatedHeadersDir = file("${buildDir}/gensrc/headers") ! ! task generateHeaders(dependsOn: compileJava) { ! enabled = IS_COMPILE_MEDIA ! doLast { ! def classpath = sourceSets.main.output; ! mkdir generatedHeadersDir; ! ! def classesList = ["com.sun.media.jfxmedia.logging.Logger", ! "com.sun.media.jfxmedia.track.AudioTrack", ! "com.sun.media.jfxmedia.control.VideoDataBuffer", ! "com.sun.media.jfxmedia.control.VideoFormat\$FormatTypes", ! "com.sun.media.jfxmediaimpl.NativeAudioClip", ! "com.sun.media.jfxmediaimpl.NativeMediaPlayer", ! "com.sun.media.jfxmediaimpl.NativeVideoBuffer", ! "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTPlatform", ! "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMedia", ! "com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer", ! "com.sun.media.jfxmediaimpl.NativeAudioEqualizer", ! "com.sun.media.jfxmediaimpl.NativeEqualizerBand", ! "com.sun.media.jfxmediaimpl.NativeAudioSpectrum"] ! if (IS_MAC) { ! classesList.addAll( ["com.sun.media.jfxmediaimpl.platform.osx.OSXPlatform", ! "com.sun.media.jfxmediaimpl.platform.osx.OSXMedia", ! "com.sun.media.jfxmediaimpl.platform.osx.OSXMediaPlayer"] ); ! } ! exec { ! commandLine ("${JAVAH}", "-d", "${generatedHeadersDir}", "-classpath", "${classpath.asPath}"); ! args classesList; ! } ! } ! } task generateMediaErrorHeader(dependsOn: [compileToolsJava, compileJava]) { enabled = IS_COMPILE_MEDIA doLast { ! def classpath = files(sourceSets.main.output, sourceSets.tools.output); def sourcepath = sourceSets.main.java.srcDirs; - def headerpath = file("$generatedHeadersDir/jfxmedia_errors.h"); def srcRoot = (sourcepath.toArray())[0]; mkdir generatedHeadersDir; exec { ! commandLine("$JAVA", "-classpath", "${classpath.asPath}"); ! args("headergen.HeaderGen", "$headerpath", "$srcRoot"); } } } task buildNativeTargets { enabled = IS_COMPILE_MEDIA } --- 2725,2793 ---- project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.media" + sourceSets { + main + //shims // no test shims needed + test + tools { + java.srcDir "src/tools/java" + } + } + + project.ext.moduleSourcePath = defaultModuleSourcePath + project.ext.moduleSourcePathShim = defaultModuleSourcePathShim + + commonModuleSetup(project, [ 'base', 'graphics', 'media' ]) + dependencies { } compileJava.dependsOn updateCacheIfNeeded ! compileJava { ! // generate the native headers during compile ! options.compilerArgs.addAll([ ! '-h', "${project.buildDir}/gensrc/headers" ! ]) } compileToolsJava { enabled = IS_COMPILE_MEDIA ! options.compilerArgs.addAll(project.modulePathArgs) ! options.compilerArgs.addAll([ ! '--add-exports', 'javafx.media/com.sun.media.jfxmedia=ALL-UNNAMED', ! ]) } project.ext.makeJobsFlag = IS_WINDOWS && IS_DEBUG_NATIVE ? "-j1" : "-j5"; project.ext.buildType = IS_DEBUG_NATIVE ? "Debug" : "Release"; def nativeSrcDir = file("${projectDir}/src/main/native") ! def generatedHeadersDir = file("${buildDir}/gensrc/headers/${project.moduleName}") task generateMediaErrorHeader(dependsOn: [compileToolsJava, compileJava]) { enabled = IS_COMPILE_MEDIA + def headerpath = file("$generatedHeadersDir/jfxmedia_errors.h"); doLast { ! def classpath = files(sourceSets.tools.output); def sourcepath = sourceSets.main.java.srcDirs; def srcRoot = (sourcepath.toArray())[0]; mkdir generatedHeadersDir; exec { ! commandLine("$JAVA"); ! args += patchModuleArgs ! args += [ '--add-exports=javafx.media/com.sun.media.jfxmedia=ALL-UNNAMED' ] ! args += [ '-classpath', "${classpath.asPath}" ] ! args += [ "headergen.HeaderGen", "$headerpath", "$srcRoot" ] } } + outputs.file(project.file("$headerpath")) } task buildNativeTargets { enabled = IS_COMPILE_MEDIA }
*** 2504,2514 **** def projectDir = t.name.startsWith("arm") ? "linux" : t.name def mediaProperties = targetProperties.media // Makefile for OSX needs to know if we're building for parfait def compileParfait = IS_COMPILE_PARFAIT ? "true" : "false" ! def buildNative = task("build${t.capital}Native", dependsOn: [generateHeaders, generateMediaErrorHeader]) { enabled = targetProperties.compileMediaNative if (!targetProperties.compileMediaNative) { println("Not compiling native Media for ${t.name} per configuration request"); } --- 2798,2808 ---- def projectDir = t.name.startsWith("arm") ? "linux" : t.name def mediaProperties = targetProperties.media // Makefile for OSX needs to know if we're building for parfait def compileParfait = IS_COMPILE_PARFAIT ? "true" : "false" ! def buildNative = task("build${t.capital}Native", dependsOn: [generateMediaErrorHeader]) { enabled = targetProperties.compileMediaNative if (!targetProperties.compileMediaNative) { println("Not compiling native Media for ${t.name} per configuration request"); }
*** 2727,2744 **** } project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.web" ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, [ "base", "graphics" ], ! null, testInclude, ! project.projectDir.path + "/src/test/addExports" ! ) dependencies { - compile project(":base"), project(":graphics"), project(":controls"), project(":media") } compileJava.dependsOn updateCacheIfNeeded task webArchiveJar(type: Jar) { --- 3021,3042 ---- } project.ext.buildModule = true project.ext.moduleRuntime = true project.ext.moduleName = "javafx.web" ! sourceSets { ! main ! shims ! test ! } ! ! project.ext.moduleSourcePath = defaultModuleSourcePath ! project.ext.moduleSourcePathShim = defaultModuleSourcePathShim ! ! commonModuleSetup(project, [ 'base', 'graphics', 'controls', 'media', 'web' ]) dependencies { } compileJava.dependsOn updateCacheIfNeeded task webArchiveJar(type: Jar) {
*** 2747,2816 **** } archiveName = "webArchiveJar.jar" destinationDir = file("$buildDir/testing/resources") } test { if (!IS_JIGSAW_TEST) { //TODO: support this in Jake // Run web tests in headless mode systemProperty 'glass.platform', 'Monocle' systemProperty 'monocle.platform', 'Headless' systemProperty 'prism.order', 'sw' } dependsOn webArchiveJar def testResourceDir = file("$buildDir/testing/resources") jvmArgs "-DWEB_ARCHIVE_JAR_TEST_DIR=$testResourceDir" } ! if (!IS_COMPILE_WEBKIT) { ! // Include wrapper classes that are otherwise generated by native build ! sourceSets.main.java.srcDirs += "src/main/java-wrappers" ! } ! task generateHeaders(dependsOn: compileJava) { doLast { ! def classpath = files("$buildDir/classes/main", ! project(":graphics").sourceSets.main.output.classesDir) ! def dest = file("$buildDir/gensrc/headers"); mkdir dest; exec { ! commandLine("$JAVAH", "-d", "$dest", ! "-classpath", "${classpath.asPath}"); args("java.lang.Character", "java.net.IDN", ! "com.sun.webkit.ContextMenu", ! "com.sun.webkit.ContextMenuItem", ! "com.sun.webkit.CursorManager", ! "com.sun.webkit.PageCache", ! "com.sun.webkit.PopupMenu", ! "com.sun.webkit.SharedBuffer", ! "com.sun.webkit.WatchdogTimer", ! "com.sun.webkit.WebPage", ! "com.sun.webkit.LoadListenerClient", ! "com.sun.webkit.event.WCFocusEvent", ! "com.sun.webkit.event.WCKeyEvent", ! "com.sun.webkit.event.WCMouseEvent", ! "com.sun.webkit.event.WCMouseWheelEvent", ! "com.sun.webkit.graphics.GraphicsDecoder", ! "com.sun.webkit.graphics.RenderMediaControls", ! "com.sun.webkit.graphics.RenderTheme", ! "com.sun.webkit.graphics.ScrollBarTheme", ! "com.sun.webkit.graphics.WCMediaPlayer", ! "com.sun.webkit.graphics.WCGraphicsManager", ! "com.sun.webkit.graphics.WCRenderQueue", ! "com.sun.webkit.graphics.WCPath", ! "com.sun.webkit.graphics.WCPathIterator", ! "com.sun.webkit.Timer", ! "com.sun.webkit.WCFrameView", ! "com.sun.webkit.WCPasteboard", ! "com.sun.webkit.WCPluginWidget", ! "com.sun.webkit.dom.JSObject", ! "com.sun.webkit.network.SocketStreamHandle", ! "com.sun.webkit.network.URLLoader", ! "com.sun.webkit.text.TextBreakIterator", ! "com.sun.webkit.text.TextNormalizer"); } } } task compileGenerated() --- 3045,3106 ---- } archiveName = "webArchiveJar.jar" destinationDir = file("$buildDir/testing/resources") } + def gensrcDir = "${buildDir}/gensrc/java" + + // add in the wrappers to the compile + sourceSets.main.java.srcDirs += "${gensrcDir}" + + if (IS_COMPILE_WEBKIT) { + compileJava { + // generate the native headers during compile + // only needed if we are doing the native compile + options.compilerArgs.addAll([ + '-h', "${project.buildDir}/gensrc/headers" + ]) + } + } else { + // Instead of compiling native wrappers, use a pre-generated version + + // Copy these to a common location in the moduleSourcePath + def copyWrappers = project.task("copyPreGeneratedWrappers", type: Copy) { + enabled = (!IS_COMPILE_WEBKIT) + + from "src/main/java-wrappers" + into "${gensrcDir}" + } + + compileJava.dependsOn(copyWrappers); + } + test { + /* if (!IS_JIGSAW_TEST) { //TODO: support this in Jake // Run web tests in headless mode systemProperty 'glass.platform', 'Monocle' systemProperty 'monocle.platform', 'Headless' systemProperty 'prism.order', 'sw' } + */ dependsOn webArchiveJar def testResourceDir = file("$buildDir/testing/resources") jvmArgs "-DWEB_ARCHIVE_JAR_TEST_DIR=$testResourceDir" } ! // generate some headers that are not part of our build task generateHeaders(dependsOn: compileJava) { doLast { ! def dest = file("$buildDir/gensrc/headers/${project.moduleName}"); mkdir dest; exec { ! commandLine("$JAVAH", "-d", "$dest",); args("java.lang.Character", "java.net.IDN", ! ); } } } task compileGenerated()
*** 2825,2837 **** } def webkitOutputDir = cygpath("$buildDir/${t.name}") def webkitConfig = IS_DEBUG_NATIVE ? "Debug" : "Release" ! def compileNativeTask = task("compileNative${t.capital}", dependsOn: generateHeaders) << { println "Building Webkit configuration /$webkitConfig/ into $webkitOutputDir" def dependencyFile = configurations.webkit.filter( { File f -> f.getName().contains(classifier) } ).getSingleFile() ant.unzip(src: dependencyFile, dest: webkitOutputDir) --- 3115,3131 ---- } def webkitOutputDir = cygpath("$buildDir/${t.name}") def webkitConfig = IS_DEBUG_NATIVE ? "Debug" : "Release" ! def compileNativeTask = task("compileNative${t.capital}", dependsOn: [generateHeaders, compileJava]) { println "Building Webkit configuration /$webkitConfig/ into $webkitOutputDir" + enabled = (IS_COMPILE_WEBKIT) + outputs.dir("$webkitOutputDir/$webkitConfig/DerivedSources/WebCore/nativeJava/java") + + doLast { def dependencyFile = configurations.webkit.filter( { File f -> f.getName().contains(classifier) } ).getSingleFile() ant.unzip(src: dependencyFile, dest: webkitOutputDir)
*** 2899,2908 **** --- 3193,3204 ---- } copy { from "$webkitOutputDir/$webkitConfig/lib/${library('DumpRenderTreeJava')}" into "$buildDir/test/${t.name}" } + + } } if (IS_WINDOWS && t.name == "win") { def webkitProperties = project.rootProject.ext[t.upper].webkit def rcTask = project.task("rc${t.capital}", type: CompileResourceTask) {
*** 2914,2934 **** output(file("$webkitOutputDir/$webkitConfig/WebCore/obj")) } compileNativeTask.dependsOn rcTask } ! def compileGeneratedTask = task("compileGenerated${t.capital}", type: JavaCompile, dependsOn: compileNativeTask) { ! def gensrcDir = "$webkitOutputDir/$webkitConfig/DerivedSources/WebCore/nativeJava/java" ! doFirst { copy { from "$projectDir/src/main/java-wrappers/com/sun/webkit/dom/EventListenerImpl.java" ! into "$gensrcDir/com/sun/webkit/dom" } } ! classpath = files(project.sourceSets.main.output.classesDir) ! source gensrcDir destinationDir = file("$buildDir/classes/main") } compileGenerated.dependsOn compileGeneratedTask if (!targetProperties.compileWebnodeNative) { --- 3210,3244 ---- output(file("$webkitOutputDir/$webkitConfig/WebCore/obj")) } compileNativeTask.dependsOn rcTask } ! def copyGeneratedTask = task("copyGenerated${t.capital}", dependsOn: [compileJava, compileNativeTask]) { ! enabled = (IS_COMPILE_WEBKIT) ! ! outputs.dir "${gensrcDir}" ! ! doLast{ copy { from "$projectDir/src/main/java-wrappers/com/sun/webkit/dom/EventListenerImpl.java" ! into "${gensrcDir}/com/sun/webkit/dom" ! } ! copy { ! from "$webkitOutputDir/$webkitConfig/DerivedSources/WebCore/nativeJava/java" ! into "${gensrcDir}" ! } } } ! ! def compileGeneratedTask = task("compileGenerated${t.capital}", type: JavaCompile, dependsOn: copyGeneratedTask) { destinationDir = file("$buildDir/classes/main") + classpath = configurations.compile + source = project.sourceSets.main.java.srcDirs + options.compilerArgs.addAll([ + '-implicit:none', + '--module-source-path', defaultModuleSourcePath + ]) } compileGenerated.dependsOn compileGeneratedTask if (!targetProperties.compileWebnodeNative) {
*** 2945,2980 **** from "$buildDir/classes/main" include drtClasses } if (IS_COMPILE_WEBKIT) { ! jar.dependsOn compileGenerated, drtJar } } // This project is for system tests that need to run with a full SDK. // Most of them display a stage or do other things that preclude running // them in a shared JVM or as part of the "smoke test" run (which must // not pop up any windows or use audio). As such, they are only enabled // when FULL_TEST is specified, and each test runs in its own JVM project(":systemTests") { dependencies { testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output testCompile project(":controls").sourceSets.test.output testCompile project(":swing").sourceSets.test.output } ! Set<String> testInclude = [ "test/**" ] ! configureJigsawTests(project, [ "base", "graphics", "controls", "swing", "fxml", "web" ], ! null, testInclude, ! project.projectDir.path + "/src/test/addExports" ! ) test { enabled = IS_FULL_TEST if (!IS_USE_ROBOT) { // Disable all robot-based visual tests exclude("test/robot/**"); } if (!IS_AWT_TEST) { --- 3255,3350 ---- from "$buildDir/classes/main" include drtClasses } if (IS_COMPILE_WEBKIT) { ! assemble.dependsOn compileGenerated, drtJar } } // This project is for system tests that need to run with a full SDK. // Most of them display a stage or do other things that preclude running // them in a shared JVM or as part of the "smoke test" run (which must // not pop up any windows or use audio). As such, they are only enabled // when FULL_TEST is specified, and each test runs in its own JVM project(":systemTests") { + project.ext.buildModule = false + project.ext.moduleRuntime = false + project.ext.moduleName = "systemTests" + dependencies { testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output testCompile project(":controls").sourceSets.test.output testCompile project(":swing").sourceSets.test.output } ! commonModuleSetup(project, [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ]) ! ! File patchPolicyFile = new File(project.buildDir, TESTJAVAPOLICYFILE); ! File runArgsFile = new File(project.buildDir,RUNARGSFILE); ! ! def sts = task("systemTestSetup") { ! outputs.file(patchPolicyFile) ! outputs.file(runArgsFile) ! ! doLast() { ! runArgsFile.delete() ! patchPolicyFile.delete() ! ! logger.info("Creating patchmodule.args file ${runArgsFile}") ! ! // Create an argfile with the information needed to launch ! // the stand alone system unit tests. ! ! //First add in all of the patch-module args we use for the ! //normal unit tests ! testPatchModuleArgs.each { str -> ! runArgsFile << "${str}\n" ! } ! ! // Now add in the working classpath elements (junit, test classes...) ! runArgsFile << "-cp \"\\\n" ! test.classpath.each() { elem -> ! def e = cygpath("${elem}") ! runArgsFile << " ${e}${File.pathSeparator}\\\n" ! } ! runArgsFile << "\"\n" ! ! // Now create a policy file with full paths matching the patched modules ! // we have provided. This needs to be in sync with testPatchModuleArgs ! moduleProjList.each { project -> ! if (project.hasProperty("moduleName") && project.buildModule) { ! File dir; ! if (test && project.sourceSets.hasProperty('shims')) { ! dir = new File(project.sourceSets.shims.output.classesDir, project.ext.moduleName); ! } else { ! dir = new File(project.sourceSets.main.output.classesDir, project.ext.moduleName); ! } ! ! String themod = dir.toURI() ! patchPolicyFile << "grant codeBase \"${themod}\" {\n" + ! " permission java.security.AllPermission;\n" + ! "};\n" ! } ! } ! } ! } ! ! test.dependsOn(sts) ! test.dependsOn(createTestArgfiles); test { enabled = IS_FULL_TEST + + // Properties passed to test.util.Util + systemProperties 'worker.debug': IS_WORKER_DEBUG + systemProperties 'worker.patchmodule.file': cygpath(runArgsFile.path) + systemProperties 'worker.patch.policy': cygpath(patchPolicyFile.path) + systemProperties 'worker.java.cmd': JAVA + if (!IS_USE_ROBOT) { // Disable all robot-based visual tests exclude("test/robot/**"); } if (!IS_AWT_TEST) {
*** 2991,3047 **** // The following block is a workaround for the fact that presently Gradle // can't set the -XDignore.symbol.file flag, because it appears that the // javac API is lacking support for it. So what we'll do is find any Compile // task and manually provide the options necessary to fire up the // compiler with the right settings. - // - // Also, we need to remove jfxrt.jar from the ext classpath (if it is there) tasks.withType(JavaCompile) { compile -> if (compile.options.hasProperty("useAnt")) { compile.options.useAnt = true compile.options.useDepend = IS_USE_DEPEND } else if (compile.options.hasProperty("incremental")) { compile.options.incremental = IS_INCREMENTAL } compile.options.debug = true // we always generate debugging info in the class files compile.options.debugOptions.debugLevel = IS_DEBUG_JAVA ? "source,lines,vars" : "source,lines" compile.options.fork = true compile.options.forkOptions.executable = JAVAC compile.options.warnings = IS_LINT ! compile.options.compilerArgs = ["-XDignore.symbol.file", "-encoding", "UTF-8"] ! if (!DO_BUILD_SDK_FOR_TEST) { ! compile.classpath = files(jfxrtJarFromSdk) + compile.classpath } // Add in the -Xlint options if (IS_LINT) { LINT.split("[, ]").each { s -> compile.options.compilerArgs += "-Xlint:$s" } } } - } ! // fxpackager requires JDK 9 to compile ! project(":fxpackager") { ! tasks.withType(JavaCompile) { compile -> ! compile.options.forkOptions.executable = JIGSAW_JAVAC ! compile.options.compilerArgs = [ ! "--add-exports", "java.base/sun.security.pkcs=ALL-UNNAMED", ! "--add-exports", "java.base/sun.security.timestamp=ALL-UNNAMED", ! "--add-exports", "java.base/sun.security.x509=ALL-UNNAMED", ! "-encoding", "UTF-8"] } - } ! // fxpackagerservices requires JDK 9 to compile ! project(":fxpackagerservices") { ! tasks.withType(JavaCompile) { compile -> ! compile.options.forkOptions.executable = JIGSAW_JAVAC ! compile.options.compilerArgs = [ ! "-encoding", "UTF-8"] } } /****************************************************************************** * * * Top Level Tasks * --- 3361,3460 ---- // The following block is a workaround for the fact that presently Gradle // can't set the -XDignore.symbol.file flag, because it appears that the // javac API is lacking support for it. So what we'll do is find any Compile // task and manually provide the options necessary to fire up the // compiler with the right settings. tasks.withType(JavaCompile) { compile -> if (compile.options.hasProperty("useAnt")) { compile.options.useAnt = true compile.options.useDepend = IS_USE_DEPEND } else if (compile.options.hasProperty("incremental")) { compile.options.incremental = IS_INCREMENTAL } compile.options.debug = true // we always generate debugging info in the class files compile.options.debugOptions.debugLevel = IS_DEBUG_JAVA ? "source,lines,vars" : "source,lines" compile.options.fork = true + compile.options.forkOptions.executable = JAVAC + compile.options.warnings = IS_LINT ! ! compile.options.compilerArgs += ["-XDignore.symbol.file", "-encoding", "UTF-8"] ! ! // If I am a module.... ! if (project.hasProperty('moduleSourcePath') && ! (project.hasProperty('buildModule') && project.buildModule)) { ! project.compileJava { ! options.compilerArgs.addAll([ ! '-implicit:none', ! '--module-source-path', project.moduleSourcePath ! ]) ! } ! // no jars needed for modules ! project.jar.enabled = false ! ! // and redirect the resources into the module ! project.processResources.destinationDir = project.moduleDir } // Add in the -Xlint options if (IS_LINT) { LINT.split("[, ]").each { s -> compile.options.compilerArgs += "-Xlint:$s" } } + } // tasks with javaCompile + + if (project.hasProperty('moduleSourcePathShim') && + project.sourceSets.hasProperty('shims')) { + + // sync up the obvious source directories with the shims + // others (like the shaders in graphics) should be added in there + project.sourceSets.shims.java.srcDirs += project.sourceSets.main.java.srcDirs + project.sourceSets.shims.java.srcDirs += "$buildDir/gensrc/java" + + project.compileShimsJava { + options.compilerArgs.addAll([ + '-implicit:none', + '--module-source-path', project.moduleSourcePathShim + ]) + } + + compileTestJava.dependsOn(compileShimsJava) + } + + if (project.hasProperty('modulePathArgs')) { + project.compileJava.options.compilerArgs.addAll(modulePathArgs) } ! if (project.hasProperty('testModulePathArgs')) { ! project.compileTestJava.options.compilerArgs.addAll(testModulePathArgs) } ! if (project.hasProperty('testPatchModuleArgs')) { ! project.test.jvmArgs += testPatchModuleArgs } + + if (project.hasProperty('addExports')) { + project.compileTestJava.options.compilerArgs.addAll(addExports); + project.test.jvmArgs += addExports + } + + if (rootProject.hasProperty("EXTRA_TEST_ARGS") && project.hasProperty('test')) { + EXTRA_TEST_ARGS.split(' ').each() { e -> + project.test.jvmArgs += e + } + } + + if (rootProject.hasProperty("EXTRA_COMPILE_ARGS") && project.hasProperty('compileJava')) { + project.compileJava.options.compilerArgs.addAll(EXTRA_COMPILE_ARGS.split(' ')) + } + + if (rootProject.hasProperty("EXTRA_COMPILE_ARGS") && project.hasProperty('compileTestJava')) { + project.compileTestJava.options.compilerArgs.addAll(EXTRA_COMPILE_ARGS.split(' ')) + } + } /****************************************************************************** * * * Top Level Tasks *
*** 3071,3081 **** //delete(".gradle"); This causes problems on windows. delete("buildSrc/build"); } } ! task javadoc(type: Javadoc) { enabled = IS_BUILD_JAVADOC group = "Basic" description = "Generates the JavaDoc for all the public API" executable = JAVADOC def projectsToDocument = [ --- 3484,3507 ---- //delete(".gradle"); This causes problems on windows. delete("buildSrc/build"); } } ! task createMSPfile() { ! group = "Build" ! File mspFile = new File(rootProject.buildDir,MODULESOURCEPATH) ! outputs.file(mspFile) ! ! doLast { ! mspFile.delete() ! mspFile << "--module-source-path\n" ! mspFile << defaultModuleSourcePath ! mspFile << "\n" ! } ! } ! ! task javadoc(type: Javadoc, dependsOn: createMSPfile) { enabled = IS_BUILD_JAVADOC group = "Basic" description = "Generates the JavaDoc for all the public API" executable = JAVADOC def projectsToDocument = [
*** 3083,3106 **** project(":swing"), /*project(":swt"),*/ project(":fxml"), project(":web")] source(projectsToDocument.collect({ [it.sourceSets.main.java] })); setDestinationDir(new File(buildDir, 'javadoc')); ! // FIXME: The following is a workaround for JDK-8151191; it should be ! // reverted once that bug is fixed ! classpath += files(projectsToDocument.collect { project -> ! project.sourceSets.main.java.srcDirs ! }); ! /* ! // Might need a classpath ! classpath = files(projectsToDocument.collect { project -> ! project.sourceSets.main.compileClasspath ! }); ! classpath += files(projectsToDocument.collect { project -> ! project.sourceSets.main.output ! }); ! */ exclude("com/**/*", "Compile*", "javafx/builder/**/*", "javafx/scene/accessibility/**/*"); options.windowTitle("${javadocTitle}") options.header("${javadocHeader}") options.bottom("${javadocBottom}") if (BUILD_CLOSED) { --- 3509,3519 ---- project(":swing"), /*project(":swt"),*/ project(":fxml"), project(":web")] source(projectsToDocument.collect({ [it.sourceSets.main.java] })); setDestinationDir(new File(buildDir, 'javadoc')); ! exclude("com/**/*", "Compile*", "javafx/builder/**/*", "javafx/scene/accessibility/**/*"); options.windowTitle("${javadocTitle}") options.header("${javadocHeader}") options.bottom("${javadocBottom}") if (BUILD_CLOSED) {
*** 3110,3119 **** --- 3523,3538 ---- } options.addBooleanOption("XDignore.symbol.file").setValue(true); options.addBooleanOption("Xdoclint:none").setValue(!IS_DOC_LINT); options.addBooleanOption("javafx").setValue(true); options.addBooleanOption("use").setValue(true); + + options.setOptionFiles([ + new File("${rootProject.buildDir}/${COMPILEARGSFILE}"), + new File(rootProject.buildDir,MODULESOURCEPATH) + ]); + doLast { projectsToDocument.each { p -> copy { from "$p.projectDir/src/main/docs" into "$buildDir/javadoc"
*** 3122,3139 **** } dependsOn(projectsToDocument.collect { project -> project.getTasksByName("classes", true)}); } - task jfxrt() { - if (DO_BUILD_SDK_FOR_TEST) { - rootProject.getTasksByName("compileTestJava", true).each { t -> - if (t.enabled) t.dependsOn(jfxrt) - } - } - } - task sdk() { if (DO_BUILD_SDK_FOR_TEST) { rootProject.getTasksByName("test", true).each { t -> if (t.enabled) t.dependsOn(sdk) } --- 3541,3550 ----
*** 3247,3300 **** // Create the legacy sdk from the modular-sdk compileTargets { t -> ! def targetProperties = project.ext[t.upper] ! def platformPrefix = targetProperties.platformPrefix ! def sdkDirName = "${platformPrefix}sdk" ! def modularSdkDirName = "${platformPrefix}modular-sdk" ! def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" ! def modulesDir = "${modularSdkDir}/modules" ! def modulesCmdsDir = "${modularSdkDir}/modules_cmds" ! def modulesLibsDir = "${modularSdkDir}/modules_libs" ! ! // The jfxrt task is responsible for creating the legacy jfxrt.jar. A developer may ! // have multiple SDK's on their system at any one time, depending on which ! // cross compiles they have done. For example, I might have: ! // build/ios-sdk/lib/jfxrt.jar ! // build/armhf-sdk/lib/jfxrt.jar ! // and so forth. The default host build will always install into 'sdk' ! // allowing for uses where a known sdk path is needed (like IDEs) ! // build/sdk/lib/jfxrt.jar ! // This arrangement allows for multiple independent SDKs to ! // exist on a developer's system. ! def jfxrtTask = task("jfxrt$t.capital", type: Jar) { ! group = "Basic" ! description = "Creates the jfxrt.jar for the $t.name target" ! archiveName = "build/${sdkDirName}/lib/jfxrt.jar"; ! includeEmptyDirs = false ! ! moduleProjList.each { project -> ! if (project.ext.moduleRuntime) { ! from("${modulesDir}/${project.ext.moduleName}"); ! } ! } ! ! dependsOn(subprojects.collect { project -> project.getTasksByName("assemble", true)}); ! } ! ! def jfxrtIndexTask = task("jfxrtIndex$t.capital") { ! //the following is a workaround for the lack of indexing in gradle 1.4 through 1.7 ! dependsOn(jfxrtTask) ! ! doLast() { ! ant.jar (update: true, index: true, destfile: jfxrtTask.archiveName) ! } ! } ! jfxrt.dependsOn(jfxrtIndexTask) def javafxSwtTask = task("javafxSwt$t.capital", type: Jar) { enabled = COMPILE_SWT group = "Basic" description = "Creates the javafx-swt.jar for the $t.name target" archiveName = "${project(":swt").buildDir}/libs/javafx-swt.jar"; --- 3658,3678 ---- // Create the legacy sdk from the modular-sdk compileTargets { t -> ! //def targetProperties = project.ext[t.upper] ! //def platformPrefix = targetProperties.platformPrefix ! //def sdkDirName = "${platformPrefix}sdk" ! //def modularSdkDirName = "${platformPrefix}modular-sdk" ! //def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" ! //def modulesDir = "${modularSdkDir}/modules" ! //def modulesCmdsDir = "${modularSdkDir}/modules_cmds" ! //def modulesLibsDir = "${modularSdkDir}/modules_libs" + // FIXME: This is not the right place to do this, but it is + // basically what we need to do to build this def javafxSwtTask = task("javafxSwt$t.capital", type: Jar) { enabled = COMPILE_SWT group = "Basic" description = "Creates the javafx-swt.jar for the $t.name target" archiveName = "${project(":swt").buildDir}/libs/javafx-swt.jar";
*** 3311,3472 **** doLast() { ant.jar (update: true, index: true, destfile: javafxSwtTask.archiveName) } } - jfxrt.dependsOn(javafxSwtIndexTask) - 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 project(":jmx").buildDir.path + "/classes/main" - from project(":jmx").buildDir.path + "/resources/main" - dependsOn project(":jmx").assemble - } - - // The 'sdk' task will build the rest of the legacy SDK, and depends - // on the 'jfxrtTask' task. After executing this task the sdk bundle for - // the current COMPILE_TARGETS will be fully created. def sdkTask = task("sdk$t.capital") { group = "Basic" - description = "Creates the SDK for $t.name" - doLast { - copy { - moduleProjList.each { project -> - from "${modulesLibsDir}/${project.ext.moduleName}" - } - into "build/${sdkDirName}/lib" - exclude("*.dll") - } - copy { - moduleProjList.each { project -> - from "${modulesLibsDir}/${project.ext.moduleName}" - } - into "build/${sdkDirName}/bin" - include("*.dll") - } - - copy { - moduleProjList.each { project -> - from "${modulesCmdsDir}/${project.ext.moduleName}" - } - into "build/${sdkDirName}/bin" - } - - // FIXME: JIGSAW -- update this for modules - // Copy over the javadocs that were generated. This is done rather than just generating - // the docs into the "right place" because for a cross-compile you only need one set of - // docs but need to have a copy in each created sdk - if (IS_BUILD_JAVADOC) { - copy { - from "build/javadoc" - into "build/${sdkDirName}/docs/api" - } - } - - // FIXME: JIGSAW -- update this for modules - // Copy over the javafx-src bundle - if (IS_BUILD_SRC_ZIP) { - copy { - from "build/javafx-src.zip" - into "build/${sdkDirName}" - } - } - - // FIXME: JIGSAW -- update this for modules - // Copy over the javapackager man files - copy { - from "${project(":fxpackager").buildDir}/man" - into "build/${sdkDirName}/man" - } - } - dependsOn(jmxTask); - dependsOn(jfxrtIndexTask) dependsOn(javafxSwtIndexTask) dependsOn(javadoc) - dependsOn(src) - } - - def generateSymbols = targetProperties.containsKey('generateSymbols') ? targetProperties.generateSymbols : false - if (generateSymbols) { - def exportedSymbolsTask = project.task("exportedSymbols${t.capital}", type: ExportedSymbolsTask, dependsOn: sdkTask, group: "Build") { - description = "Generates exported symbols file for iOS build (from .a libraries)" - def libDirName = "build/${sdkDirName}/$targetProperties.libDest" - libDir = file("$libDirName") - outputFile = file("$libDirName/exported.symbols") - excludes = targetProperties.generateSymbolsExcludes - } - sdk.dependsOn(exportedSymbolsTask) } sdk.dependsOn(sdkTask) } - /* - * This clause changes the way we handle a build.gradle within ./apps - * It does a few things: - * modifies the classpath used to include the built runttime classes - * provides for copying the build applications to the artifacts tree - * - * 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(":media").buildDir}/classes/main", - "${project(":web").buildDir}/classes/main", - ) - project(":apps") { // The apps build is Ant based, and gradle lets us "import" ant build.xml // into our configuration. - ant.importBuild 'build.xml' - compileTargets { t -> ! // The apps build is Ant based, and gradle lets us "import" ant apps/build.xml ! // into our configuration. ! // override the apps build.xml with an explicit pointer to our jar. ! def platformPrefix = rootProject.ext[t.upper].platformPrefix ! def sdkDirName = "${platformPrefix}sdk" ! def jfxrtJar = "${rootProject.buildDir}/${sdkDirName}/lib/jfxrt.jar" def appsJar = project.task("appsJar${t.capital}") { dependsOn(sdk) doLast() { ! ant.properties['targetBld'] = "$t.name" ! if (!rootProject.ext[t.upper].compileSwing) { ! ant.properties['JFX_CORE_ONLY'] = 'true' ! } ! ant.properties['jfxbuild.jfxrt.jar'] = jfxrtJar ! ant.properties['platforms.JDK_1.8.home'] = "${rootProject.ext.JDK_HOME}" ! ant.project.executeTarget("sampleAppsJar") ! ant.project.executeTarget("scenebuilderSampleAppsJar") ! if (!t.name.startsWith("arm")) { ! ant.project.executeTarget("scenebuilderAppJar") ! } } } rootProject.appsjar.dependsOn(appsJar) ! def appsClean = project.task("appsClean${t.capital}") { doLast() { ! ant.properties['targetBld'] = "$t.name" ! ant.properties['platforms.JDK_1.8.home'] = "${rootProject.ext.JDK_HOME}" ! ant.project.executeTarget("sampleAppsClean") ! ant.project.executeTarget("scenebuilderSampleAppsClean") ! if (!t.name.startsWith("arm")) { ! ant.project.executeTarget("scenebuilderAppClean") ! } } } rootProject.clean.dependsOn(appsClean) } } --- 3689,3741 ---- doLast() { ant.jar (update: true, index: true, destfile: javafxSwtTask.archiveName) } } def sdkTask = task("sdk$t.capital") { group = "Basic" dependsOn(javafxSwtIndexTask) dependsOn(javadoc) } sdk.dependsOn(sdkTask) } project(":apps") { // The apps build is Ant based, and gradle lets us "import" ant build.xml // into our configuration. compileTargets { t -> ! List<String> params = [] ! ! params << "-DtargetBld=$t.name" ! if (!rootProject.ext[t.upper].compileSwing) { ! params << "-DJFX_CORE_ONLY=true" ! } ! params << "-Dplatforms.JDK_1.9.home=${rootProject.ext.JDK_HOME}" ! params << "-Dcompile.patch=@${rootProject.buildDir}/${COMPILEARGSFILE}" ! params << "-Drun.patch=@${rootProject.buildDir}/${RUNARGSFILE}" def appsJar = project.task("appsJar${t.capital}") { dependsOn(sdk) doLast() { ! ant(t.name, ! projectDir.path, ! "appsJar", ! params); } } rootProject.appsjar.dependsOn(appsJar) ! def appsClean = project.task("clean${t.capital}") { doLast() { ! ant(t.name, ! project.projectDir.path, ! "clean", ! params); } } rootProject.clean.dependsOn(appsClean) } }
*** 3494,3506 **** def modulesCmdsDir = "${modularSdkDir}/modules_cmds" def modulesLibsDir = "${modularSdkDir}/modules_libs" def modulesSrcDir = "${modularSdkDir}/modules_src" def modulesConfDir = "${modularSdkDir}/modules_conf" def modulesMakeDir = "${modularSdkDir}/make" ! final File patchmoduleFile = file("${rootProject.buildDir}/patchmodule.args") ! project.files(patchmoduleFile); def zipTask = project.task("buildModuleZip$t.capital", type: Zip, group: "Build") { enabled = IS_BUILD_MODULE_ZIP // FIXME: JIGSAW -- this should be moved to a sub-directory so we can keep the same name --- 3763,3776 ---- def modulesCmdsDir = "${modularSdkDir}/modules_cmds" def modulesLibsDir = "${modularSdkDir}/modules_libs" def modulesSrcDir = "${modularSdkDir}/modules_src" def modulesConfDir = "${modularSdkDir}/modules_conf" def modulesMakeDir = "${modularSdkDir}/make" ! final File runArgsFile = file("${rootProject.buildDir}/${RUNARGSFILE}") ! final File compileArgsFile = file("${rootProject.buildDir}/${COMPILEARGSFILE}") ! project.files(runArgsFile); def zipTask = project.task("buildModuleZip$t.capital", type: Zip, group: "Build") { enabled = IS_BUILD_MODULE_ZIP // FIXME: JIGSAW -- this should be moved to a sub-directory so we can keep the same name
*** 3529,3538 **** --- 3799,3809 ---- def srcClassesDir = "${buildDir}/${platformPrefix}module-classes" def dstClassesDir = "${modulesDir}/${moduleName}" copy { from srcClassesDir into dstClassesDir + exclude("module-info.class") } def srcCmdsDir = "${buildDir}/${platformPrefix}module-bin" def dstCmdsDir = "${modulesCmdsDir}/${moduleName}" copy {
*** 3546,3559 **** from srcLibsDir into dstLibsDir } // Copy module-info.java ! def srcModuleInfoDir = "${project.projectDir}/src/main/module-info" def dstModuleInfoDir = "${modulesSrcDir}/${moduleName}" copy { ! from srcModuleInfoDir into dstModuleInfoDir if (!IS_COMPILE_JFR && project.name.equals("base")) { filter { line-> line.contains("requires jdk.jfr;") ? "" : line } } } --- 3817,3830 ---- from srcLibsDir into dstLibsDir } // Copy module-info.java ! def srcModuleInfoFile = "${project.projectDir}/src/main/java/module-info.java" def dstModuleInfoDir = "${modulesSrcDir}/${moduleName}" copy { ! from srcModuleInfoFile into dstModuleInfoDir if (!IS_COMPILE_JFR && project.name.equals("base")) { filter { line-> line.contains("requires jdk.jfr;") ? "" : line } } }
*** 3566,3584 **** into dstMakeDir } } // Copy dependencies/*/module-info.java.extra def dependencyRoots = moduleDependencies if (rootProject.hasProperty("closedModuleDepedencies")) { dependencyRoots = [dependencyRoots, closedModuleDepedencies].flatten() } ! copy { dependencyRoots.each { root -> ! from root } - into modulesSrcDir } // concatecate java.policy files into a single file // def outputPolicyDir = "${modulesConfDir}/java.base/security" --- 3837,3893 ---- into dstMakeDir } } // Copy dependencies/*/module-info.java.extra + // merging as needed, removing duplicates + // only lines with 'exports' will be copied def dependencyRoots = moduleDependencies if (rootProject.hasProperty("closedModuleDepedencies")) { dependencyRoots = [dependencyRoots, closedModuleDepedencies].flatten() } ! ! Map extras = [:] ! dependencyRoots.each { root -> ! FileTree ft = fileTree(root).include('**/*.extra') ! ft.each() { e-> ! String usename = e.path ! String filePath = e.getAbsolutePath() ! String folderPath = root.getAbsolutePath() ! if (filePath.startsWith(folderPath)) { ! usename = filePath.substring(folderPath.length() + 1); ! } ! if (extras.containsKey(usename)) { ! List<String> lines = extras.get(usename) ! e.eachLine { line -> ! line = line.trim() ! if (line.contains("exports")) { ! lines << line ! } ! } ! ! } else { ! List<String> lines = [] ! e.eachLine { line -> ! if (line.contains("exports")) { ! lines << line.trim() ! } ! } ! extras.put(usename,lines) ! } ! } ! } ! extras.keySet().each() { e-> ! File f = new File(modulesSrcDir, e) ! f.getParentFile().mkdirs() ! f.delete() ! ! extras.get(e).unique().each() { l-> ! f << l ! f << "\n" } } // concatecate java.policy files into a single file // def outputPolicyDir = "${modulesConfDir}/java.base/security"
*** 3593,3632 **** } } zipTask.dependsOn(buildModulesTask); buildModules.dependsOn(buildModulesTask) ! def buildModulesPatchTask = task("buildModulesPatch$t.capital", group: "Build") { doLast() { ! patchmoduleFile.delete() ! ! logger.info("Creating patchmodule.args file ${patchmoduleFile}") ! String thepath=cygpath("${rootProject.buildDir}/sdk/${targetProperties.libDest}") - patchmoduleFile << "-Djava.library.path=${thepath}\n" moduleProjList.each { project -> def moduleName = project.ext.moduleName def dstModuleDir = cygpath("${modulesDir}/${moduleName}") ! patchmoduleFile << "--patch-module ${moduleName}=\"${dstModuleDir}\"\n" } } } ! buildModulesPatchTask.dependsOn(buildModulesTask) ! buildModules.dependsOn(buildModulesPatchTask) def isWindows = IS_WINDOWS && t.name == "win"; def isMac = IS_MAC && t.name == "mac"; // Create layout for modular classes moduleProjList.each { project -> def buildModuleClassesTask = project.task("buildModule$t.capital", group: "Build") { dependsOn(project.assemble) def buildDir = project.buildDir def sourceBuildDirs = [ ! "${buildDir}/classes/main", ! "${buildDir}/resources/main" ] doLast { def moduleClassesDir = "$buildDir/${platformPrefix}module-classes" copy { includeEmptyDirs = false --- 3902,3954 ---- } } zipTask.dependsOn(buildModulesTask); buildModules.dependsOn(buildModulesTask) ! def buildRunArgsTask = task("buildRunArgs$t.capital", ! group: "Build", dependsOn: buildModulesTask) { ! outputs.file(runArgsFile); doLast() { ! List<String>libpath = [] ! List<String>modpath = [] moduleProjList.each { project -> def moduleName = project.ext.moduleName def dstModuleDir = cygpath("${modulesDir}/${moduleName}") ! modpath << "${moduleName}=${dstModuleDir}" } + + writeRunArgsFile(runArgsFile, computeLibraryPath(true), modpath) } } + buildModules.dependsOn(buildRunArgsTask) ! def buildCompileArgsTask = task("buildCompileArgs$t.capital", ! group: "Build", dependsOn: buildModulesTask) { ! outputs.file(compileArgsFile); ! doLast() { ! List<String> modlist = [] ! moduleProjList.each { project -> ! def moduleName = project.ext.moduleName ! def dstModuleDir = "${modulesDir}/${moduleName}" ! modlist << dstModuleDir ! } ! writeCompileArgsFile(compileArgsFile, modlist); ! } ! } ! buildModules.dependsOn(buildCompileArgsTask) def isWindows = IS_WINDOWS && t.name == "win"; def isMac = IS_MAC && t.name == "mac"; // Create layout for modular classes moduleProjList.each { project -> def buildModuleClassesTask = project.task("buildModule$t.capital", group: "Build") { dependsOn(project.assemble) def buildDir = project.buildDir def sourceBuildDirs = [ ! "${buildDir}/classes/main/${project.moduleName}", ] doLast { def moduleClassesDir = "$buildDir/${platformPrefix}module-classes" copy { includeEmptyDirs = false
*** 3835,3856 **** from("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}") { include "libavplugin*.so" } } else from ("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}/${library("glib-lite")}") } else { if (t.name != "android" && t.name != "dalvik" ) { [ "fxplugins", "gstreamer-lite", "jfxmedia" ].each { name -> ! from ("$LIBRARY_STUB/${library(name)}") } } if (t.name == "mac") { // copy libjfxmedia_{avf,qtkit}.dylib if they exist [ "jfxmedia_qtkit", "jfxmedia_avf", "glib-lite" ].each { name -> ! from ("$LIBRARY_STUB/${library(name)}") } } else if (t.name == "linux") { ! from(LIBRARY_STUB) { include "libavplugin*.so" } } else if (t.name != "android" && t.name != "dalvik" ) { ! from ("$LIBRARY_STUB/${library("glib-lite")}") } } } --- 4157,4178 ---- from("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}") { include "libavplugin*.so" } } else from ("${mediaProject.buildDir}/native/${t.name}/${mediaBuildType}/${library("glib-lite")}") } else { if (t.name != "android" && t.name != "dalvik" ) { [ "fxplugins", "gstreamer-lite", "jfxmedia" ].each { name -> ! from ("$MEDIA_STUB/${library(name)}") } } if (t.name == "mac") { // copy libjfxmedia_{avf,qtkit}.dylib if they exist [ "jfxmedia_qtkit", "jfxmedia_avf", "glib-lite" ].each { name -> ! from ("$MEDIA_STUB/${library(name)}") } } else if (t.name == "linux") { ! from(MEDIA_STUB) { include "libavplugin*.so" } } else if (t.name != "android" && t.name != "dalvik" ) { ! from ("$MEDIA_STUB/${library("glib-lite")}") } } }
*** 3861,3871 **** if (IS_COMPILE_WEBKIT) { from ("${webProject.buildDir}/libs/${t.name}/${library('jfxwebkit')}") } else { if (t.name != "android" && t.name != "ios" && t.name != "dalvik") { ! from ("$LIBRARY_STUB/${library('jfxwebkit')}") } } } // FIXME: the following is a hack to workaround the fact that there --- 4183,4193 ---- if (IS_COMPILE_WEBKIT) { from ("${webProject.buildDir}/libs/${t.name}/${library('jfxwebkit')}") } else { if (t.name != "android" && t.name != "ios" && t.name != "dalvik") { ! from ("$WEB_STUB/${library('jfxwebkit')}") } } } // FIXME: the following is a hack to workaround the fact that there
*** 3897,4116 **** } } buildModulesTask.dependsOn(buildModuleLibsTask) ! def sdkTask = tasks.getByName("sdk${t.capital}"); ! sdkTask.dependsOn(buildModulesTask) ! } ! sdk.dependsOn(buildModules) ! ! void configureJigsawTests( ! Project p, ! List<String> moduleDeps, ! Set<String> patchInc, ! Set<String> testsInc, ! String addExportsFile ! ) { ! ! if(!IS_JIGSAW_TEST) { ! return ! } ! ! p.configurations { ! jigsawTest ! } ! p.dependencies { ! jigsawTest group: "junit", name: "junit", version: "4.8.2" ! } ! ! compileTargets { t -> ! ! def targetProperties = project.rootProject.ext[t.upper] ! def modularSdkDirName = "${targetProperties.platformPrefix}modular-sdk" ! def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" ! def modulesDir = "${modularSdkDir}/modules" ! boolean useModule = true ! String moduleName ! if(!p.hasProperty('moduleName')) { ! useModule = false ! moduleName = "systemTests" ! } else { ! moduleName = p.moduleName } ! logger.info("configuring $p.name for modular test copy"); ! def testingDir = "${rootProject.buildDir}/${targetProperties.platformPrefix}testing"; ! def patchesDir = new File("${testingDir}/modules"); ! File patchPolicyFile = new File("${testingDir}/java.patch.policy"); ! File patchmoduleFile = new File("${testingDir}/patchmodule.args"); ! String javaLibraryPath = "${rootProject.buildDir}/sdk/$targetProperties.libDest" ! def jigsawPatchesBaseDir = new File("${testingDir}/modules/$moduleName"); ! def jigsawPatchesTestDir = new File("${testingDir}/tests/$moduleName"); ! ! p.files(patchPolicyFile); ! p.files(patchmoduleFile); ! ! def srcClassesDir = "${p.buildDir}/${targetProperties.platformPrefix}module-classes" ! Task classes = p.task("jigsawCopyClasses${t.capital}", type: Copy, dependsOn: [p.classes]) { ! ! enabled = useModule ! ! from srcClassesDir ! into jigsawPatchesBaseDir } ! Task shims = p.task("jigsawCopyShims${t.capital}", type: Copy, dependsOn: [p.testClasses]) { ! //from p.sourceSets.test.output.classesDir ! enabled = useModule ! from p.sourceSets.test.output ! into jigsawPatchesBaseDir ! if (patchInc != null) { ! include patchInc ! } else { ! include "**/*" ! } ! if (testsInc != null) { ! exclude testsInc ! } ! includeEmptyDirs = false ! doLast() { ! logger.info("project $p.name finished jigsawCopyShims to $jigsawPatchesBaseDir"); ! } ! } ! ! Task alltests = p.task("jigsawCopyTests${t.capital}", type: Copy, dependsOn: [p.testClasses]) { ! from p.sourceSets.test.output ! into jigsawPatchesTestDir ! if (patchInc != null) { ! exclude patchInc ! } ! if (testsInc != null) { ! include testsInc } else { ! include "**/*" } - includeEmptyDirs = false - doLast() { - logger.info("project $p.name finished jigsawCopyTests to $jigsawPatchesTestDir"); - } - } - - // create & use just one of these per platform - String nameis = "moduleTestPatchPolicy${t.capital}" - Task patchPerms = null - if (rootProject.hasProperty(nameis)) { - patchPerms = rootProject.tasks[nameis] - } else { - patchPerms = rootProject.task(nameis) { - outputs.file(patchPolicyFile) - outputs.file(patchmoduleFile) - doLast() { - logger.info("Creating test patch.policy file ${patchPolicyFile}") - logger.info("Creating test patch.policy file ${patchmoduleFile}") ! delete(patchPolicyFile) ! delete(patchmoduleFile) ! mkdir(testingDir) ! String thepath=cygpath("${rootProject.buildDir}/sdk/${targetProperties.libDest}") ! patchmoduleFile << "-Djava.library.path=${thepath}\n" ! moduleProjList.each { project -> ! String themod = file("${patchesDir}/${project.ext.moduleName}").toURI() ! patchPolicyFile << "grant codeBase \"${themod}\" {\n" + " permission java.security.AllPermission;\n" + "};\n" - - def dstModuleDir = cygpath("${patchesDir}/${project.ext.moduleName}") - patchmoduleFile << "--patch-module ${project.ext.moduleName}=\"${dstModuleDir}\"\n" - } - } - } - } - - Task jigsawTestsTask = p.task("jigsawTests${t.capital}", dependsOn: [classes, shims, alltests, patchPerms ]) { - doLast() { - logger.info("project $p.name finished jigsawTests${t.capital}"); - } - } - - FileCollection testclasspath = p.files(p.configurations.jigsawTest) - - p.test.dependsOn jigsawTestsTask - - if (moduleDeps != null) { - moduleDeps.each() {s-> - logger.info("adding dep to project $p.name $s"); - Project pdep = rootProject.project(s); - def jigsawTask = pdep.tasks.getByName("jigsawTests${t.capital}"); - jigsawTestsTask.dependsOn jigsawTask; - - testclasspath += p.files(pdep.ext.jigsawPatchesTestDir); - } - } - - testclasspath += p.files(jigsawPatchesTestDir); - - p.ext.jigsawTestClasspath = testclasspath - p.ext.jigsawPatchesTestDir = jigsawPatchesTestDir - p.ext.jigsawTestClasses = jigsawTestsTask - - p.ext.argclasspathFile = "$testingDir/classpath_"+p.name+".txt" - - p.test { - if (IS_FORCE_TESTS) { - dependsOn 'cleanTest' - } - - scanForTestClasses = false - include("**/*Test.*") - - if (IS_JIGSAW_TEST) { - dependsOn jigsawTestsTask - - doFirst { - classpath = testclasspath - p.sourceSets.test.runtimeClasspath = testclasspath } - - String bcp = "-Xbootclasspath/a:" + rootProject.projectDir.path + "/buildSrc/build/libs/buildSrc.jar" - - systemProperties 'worker.debug': IS_WORKER_DEBUG - systemProperties 'worker.patchmodule.file': cygpath(patchmoduleFile.path) - if (addExportsFile != null) { - systemProperties 'worker.exports.file': cygpath(addExportsFile) } - systemProperties 'worker.classpath.file': cygpath(p.ext.argclasspathFile) - systemProperties 'worker.java.cmd': JIGSAW_JAVA - - systemProperties 'worker.isJigsaw': true - - systemProperties 'worker.patch.policy': cygpath(patchPolicyFile.path) - - //systemProperties 'prism.order': 'sw' - //systemProperties 'glass.platform': 'Monocle' - //systemProperties
'glass.len': 'headless' - - jvmArgs bcp, "workaround.GradleJUnitWorker" ! environment("JDK_HOME", JIGSAW_HOME); ! executable (JIGSAW_JAVA); ! ! } } - } } task checkrepo() { doLast { logger.info("checking for whitespace (open)"); exec { --- 4219,4291 ---- } } buildModulesTask.dependsOn(buildModuleLibsTask) ! Task testArgFiles = task("createTestArgfiles${t.capital}") { ! File testRunArgsFile = new File(rootProject.buildDir, TESTRUNARGSFILE) ! //test (shimed) version ! File testCompileArgsFile = new File(rootProject.buildDir, TESTCOMPILEARGSFILE) ! // And a test java.policy file ! File testJavaPolicyFile = new File(rootProject.buildDir, TESTJAVAPOLICYFILE) ! ! outputs.file(testRunArgsFile) ! outputs.file(testCompileArgsFile) ! outputs.file(testJavaPolicyFile) ! doLast() { ! rootProject.buildDir.mkdir() ! List<String> projNames = [] ! moduleProjList.each { project -> ! projNames << project.name } ! // And the test (shimed) variation... ! testRunArgsFile.delete() ! logger.info("Creating argfile ${testRunArgsFile.path}") ! computePatchModuleArgs(projNames, true).each() { a-> ! testRunArgsFile << a ! testRunArgsFile << "\n" } ! testJavaPolicyFile.delete() ! List<String> modpath = [] ! moduleProjList.each { project -> ! if (project.hasProperty("moduleName") && project.buildModule) { ! File dir; ! if (project.sourceSets.hasProperty('shims')) { ! dir = new File(project.sourceSets.shims.output.classesDir, project.ext.moduleName); } else { ! dir = new File(project.sourceSets.main.output.classesDir, project.ext.moduleName); } ! modpath << dir.path ! String themod = dir.toURI() ! testJavaPolicyFile << "grant codeBase \"${themod}\" {\n" + " permission java.security.AllPermission;\n" + "};\n" } } ! writeCompileArgsFile(testCompileArgsFile, modpath) } } + sdk.dependsOn(testArgFiles) + createTestArgfiles.dependsOn(testArgFiles) + def sdkTask = tasks.getByName("sdk${t.capital}"); + sdkTask.dependsOn(buildModulesTask) } + sdk.dependsOn(buildModules) task checkrepo() { doLast { logger.info("checking for whitespace (open)"); exec {
*** 4165,4170 **** } } ) } - --- 4340,4344 ----
< prev index next >