--- a/build.gradle +++ b/build.gradle @@ -1733,7 +1733,7 @@ void addJCov(p, test) { "exclude=\"**.*Test\"," + "file=build/reports/jcov/report.xml," + "merge=merge"; - test.jvmArgs("-javaagent:${p.configurations.testClasspath.files.find { it.name.startsWith('jcov') }}=$jcovJVMArgument"); + test.jvmArgs("-javaagent:${p.configurations.testCompile.files.find { it.name.startsWith('jcov') }}=$jcovJVMArgument"); p.mkdir p.file("build/reports/jcov") } test.doLast { @@ -1741,7 +1741,7 @@ void addJCov(p, test) { if (reportFile.exists()) { p.javaexec { workingDir = p.file("build/reports/jcov") - classpath = p.files(p.configurations.testClasspath.files.find { it.name.startsWith('jcov') }) + classpath = p.files(p.configurations.testCompile.files.find { it.name.startsWith('jcov') }) main = "com.sun.tdk.jcov.Helper" args = [ "RepGen", @@ -1771,10 +1771,7 @@ allprojects { repositories { ivy { url JFX_DEPS_URL - metadataSources { - artifact() - } - patternLayout { + layout "pattern", { artifact "[artifact]-[revision](-[classifier]).[ext]" artifact "[artifact].[ext]" } @@ -1787,10 +1784,7 @@ allprojects { mavenCentral() ivy { url "https://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/" - metadataSources { - artifact() - } - patternLayout { + layout "pattern", { artifact "[artifact].[ext]" } } @@ -1801,19 +1795,13 @@ allprojects { repositories { ivy { url libAVRepositoryURL - metadataSources { - artifact() - } - patternLayout { + layout "pattern", { artifact "[artifact].[ext]" } } ivy { url FFmpegRepositoryURL - metadataSources { - artifact() - } - patternLayout { + layout "pattern", { artifact "[artifact].[ext]" } } @@ -1854,9 +1842,9 @@ allprojects { // By default all of our projects require junit for testing so we can just // setup this dependency here. dependencies { - testImplementation group: "junit", name: "junit", version: "4.8.2" + testCompile group: "junit", name: "junit", version: "4.8.2" if (BUILD_CLOSED && DO_JCOV) { - testImplementation name: "jcov" + testCompile name: "jcov" } } @@ -1953,9 +1941,9 @@ project(":base") { } dependencies { - testImplementation group: "junit", name: "junit", version: "4.8.2" - testImplementation sourceSets.main.output - testImplementation sourceSets.shims.output + testCompile group: "junit", name: "junit", version: "4.8.2" + testCompile sourceSets.main.output + testCompile sourceSets.shims.output } commonModuleSetup(project, [ 'base' ]) @@ -2029,10 +2017,10 @@ project(":graphics") { } dependencies { - stubImplementation group: "junit", name: "junit", version: "4.8.2" + stubCompile group: "junit", name: "junit", version: "4.8.2" antlr group: "org.antlr", name: "antlr4", version: "4.7.2", classifier: "complete" - implementation project(':base') + compile project(':base') } project.ext.moduleSourcePath = defaultModuleSourcePath_GraphicsOne @@ -2107,7 +2095,7 @@ project(":graphics") { project.task("compileFullJava", type: JavaCompile, dependsOn: processShaders) { description = "Compile all of the graphics java classes - main and shaders" - classpath = configurations.compileClasspath + classpath = configurations.compile source = project.sourceSets.main.java.srcDirs source += "$buildDir/gensrc/java" @@ -2274,7 +2262,7 @@ project(":graphics") { executable = JAVA workingDir = project.projectDir main = settings.generator - classpath = configurations.compileClasspath + configurations.antlr + classpath = configurations.compile + configurations.antlr classpath += files(project.sourceSets.jslc.java.outputDir) classpath += files("${project.projectDir}/src/jslc/resources") @@ -2363,7 +2351,7 @@ project(":graphics") { executable = JAVA workingDir = project.projectDir main = "CompileJSL" - classpath = configurations.compileClasspath + configurations.antlr + classpath = configurations.compile + configurations.antlr classpath += files(project.sourceSets.jslc.java.outputDir) classpath += files(project.sourceSets.jslc.resources) classpath += files("$buildDir/classes/jsl-compilers/prism", @@ -2418,7 +2406,7 @@ project(":graphics") { } if (allLibsPresent) return; - for (File f : [configurations.compileClasspath.files, configurations.antlr.files].flatten()) { + for (File f : [configurations.compile.files, configurations.antlr.files].flatten()) { copy { into libsDir from f.getParentFile() @@ -2461,10 +2449,10 @@ project(":controls") { commonModuleSetup(project, [ 'base', 'graphics', 'controls' ]) dependencies { - testImplementation project(":graphics").sourceSets.test.output - testImplementation project(":base").sourceSets.test.output - implementation project(':base') - implementation project(':graphics') + testCompile project(":graphics").sourceSets.test.output + testCompile project(":base").sourceSets.test.output + compile project(':base') + compile project(':graphics') } test { @@ -2543,8 +2531,8 @@ project(":swing") { } dependencies { - implementation project(":base") - implementation project(":graphics") + compile project(":base") + compile project(":graphics") } test { @@ -2599,7 +2587,7 @@ project(":swt") { // Skip copy if file is present. if (swtLib.exists()) return; - for (File f : configurations.compileClasspath.files) { + for (File f : configurations.compile.files) { // Have to rename the swt jar because it is some platform specific name but // for the sake of the IDEs we need to have a single stable name that works // on every platform @@ -2663,10 +2651,10 @@ project(":fxml") { dependencies { - testImplementation project(":graphics").sourceSets.test.output - testImplementation project(":base").sourceSets.test.output - implementation project(":base") - implementation project(":graphics") + testCompile project(":graphics").sourceSets.test.output + testCompile project(":base").sourceSets.test.output + compile project(":base") + compile project(":graphics") } test { @@ -2756,9 +2744,9 @@ project(":fxpackager") { } dependencies { - antpluginImplementation group: "org.apache.ant", name: "ant", version: "1.8.2" + antpluginCompile group: "org.apache.ant", name: "ant", version: "1.8.2" - testImplementation project(":controls"), + testCompile project(":controls"), group: "org.apache.ant", name: "ant", version: "1.8.2", sourceSets.antplugin.output } @@ -3328,8 +3316,8 @@ project(":media") { media name: "ffmpeg-3.3.3", ext: "tar.gz" media name: "ffmpeg-4.0.2", ext: "tar.gz" } - implementation project(":base") - implementation project(":graphics") + compile project(":base") + compile project(":graphics") } compileJava.dependsOn updateCacheIfNeeded @@ -3931,10 +3919,10 @@ project(":web") { if (IS_COMPILE_WEBKIT) { icu name: "icu4c-${icuVersion}-data-bin-l", ext: "zip" } - implementation project(":base") - implementation project(":graphics") - implementation project(":controls") - implementation project(":media") + compile project(":base") + compile project(":graphics") + compile project(":controls") + compile project(":media") } compileJava.dependsOn updateCacheIfNeeded @@ -3943,8 +3931,8 @@ project(":web") { from (project.file("$projectDir/src/test/resources/test/html")) { include "**/archive-*.*" } - archiveFileName = "webArchiveJar.jar" - destinationDirectory = file("$buildDir/testing/resources") + archiveName = "webArchiveJar.jar" + destinationDir = file("$buildDir/testing/resources") } def gensrcDir = "${buildDir}/gensrc/java" @@ -4122,7 +4110,7 @@ project(":web") { def compileJavaDOMBindingTask = task("compileJavaDOMBinding${t.capital}", type: JavaCompile, dependsOn: [compileJava, compileNativeTask, copyNativeTask]) { destinationDir = file("$buildDir/classes/java/main") - classpath = configurations.compileClasspath + classpath = configurations.compile source = project.sourceSets.main.java.srcDirs options.compilerArgs.addAll([ '-implicit:none', @@ -4140,8 +4128,8 @@ project(":web") { def drtClasses = "**/com/sun/javafx/webkit/drt/**" task drtJar(type: Jar, dependsOn: compileJava) { - archiveFileName = "drt.jar" - destinationDirectory = file("$buildDir/test") + archiveName = "drt.jar" + destinationDir = file("$buildDir/test") from "$buildDir/classes/java/main/javafx.web/" include drtClasses includeEmptyDirs = false @@ -4182,10 +4170,10 @@ project(":systemTests") { project.ext.moduleName = "systemTests" dependencies { - testImplementation project(":graphics").sourceSets.test.output - testImplementation project(":base").sourceSets.test.output - testImplementation project(":controls").sourceSets.test.output - testImplementation project(":swing").sourceSets.test.output + testCompile project(":graphics").sourceSets.test.output + testCompile project(":base").sourceSets.test.output + testCompile project(":controls").sourceSets.test.output + testCompile project(":swing").sourceSets.test.output } def dependentProjects = [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ] @@ -4240,8 +4228,8 @@ project(":systemTests") { dependsOn compileTestapp1Java enabled = IS_FULL_TEST - destinationDirectory = file("$buildDir/testapp1") - archiveFileName = testapp1JarName + destinationDir = file("$buildDir/testapp1") + archiveName = testapp1JarName includeEmptyDirs = false from project.sourceSets.testapp1.java.outputDir include("testapp/**") @@ -4261,8 +4249,8 @@ project(":systemTests") { dependsOn compileTestapp1Java enabled = IS_FULL_TEST - destinationDirectory = file("$buildDir/testapp1") - archiveFileName = "jar2.jar"; + destinationDir = file("$buildDir/testapp1") + archiveName = "jar2.jar"; includeEmptyDirs = false from project.sourceSets.testapp1.java.outputDir include("pkg2/**") @@ -4415,7 +4403,6 @@ allprojects { project.jar.enabled = false // and redirect the resources into the module - project.sourceSets.main.output.resourcesDir = project.moduleDir project.processResources.destinationDir = project.moduleDir } @@ -4449,7 +4436,6 @@ allprojects { project.sourceSets.shims.resources.srcDirs += project.sourceSets.main.resources.srcDirs // and redirect the resources into the module - project.sourceSets.shims.output.resourcesDir = project.moduleShimsDir project.processShimsResources.destinationDir = project.moduleShimsDir compileTestJava.dependsOn(copyGeneratedShimsTask) @@ -4710,8 +4696,8 @@ compileTargets { t -> enabled = COMPILE_SWT group = "Basic" description = "Creates the javafx-swt.jar for the $t.name target" - destinationDirectory = file("${project(":swt").buildDir}/libs") - archiveFileName = "javafx-swt.jar" + destinationDir = file("${project(":swt").buildDir}/libs") + archiveName = "javafx-swt.jar" includeEmptyDirs = false from("${project(":swt").buildDir}/classes/java/main"); include("**/javafx/embed/swt/**") @@ -4731,9 +4717,7 @@ compileTargets { t -> dependsOn(javafxSwtTask) doLast() { - def destDir = javafxSwtTask.destinationDirectory.get() - def afName = javafxSwtTask.archiveFileName.get() - ant.jar (update: true, index: true, destfile: "${destDir}/${afName}") + ant.jar (update: true, index: true, destfile: "${javafxSwtTask.destinationDir}/${javafxSwtTask.archiveName}") } } @@ -4899,8 +4883,8 @@ compileTargets { t -> zipsTask.dependsOn(zipSdkTask) def zipDocsTask = task("zipDocs$t.capital", type: Zip, dependsOn: zipSdkTask) { - destinationDirectory = file("${bundlesDir}") - archiveFileName = "${docsBundleName}.zip" + destinationDir = file("${bundlesDir}") + archiveName = "${docsBundleName}.zip" includeEmptyDirs = false from docsArtifactsDir into "${docsBundleName}" @@ -4908,8 +4892,8 @@ compileTargets { t -> zipsTask.dependsOn(zipDocsTask) def zipJmodsTask = task("zipJmods$t.capital", type: Zip, dependsOn: zipDocsTask) { - destinationDirectory = file("${bundlesDir}") - archiveFileName = "${jmodsBundleName}.zip" + destinationDir = file("${bundlesDir}") + archiveName = "${jmodsBundleName}.zip" includeEmptyDirs = false from jmodsArtifactsDir into "${jmodsBundleName}" @@ -5180,8 +5164,8 @@ compileTargets { t -> def dstModularJarDir = "${standaloneLibDir}" def modularJarName = "${moduleName}.jar" def modularJarTask = project.task("modularJarStandalone$t.capital", type: Jar, dependsOn: project.assemble) { - destinationDirectory = file("${dstModularJarDir}") - archiveFileName = modularJarName + destinationDir = file("${dstModularJarDir}") + archiveName = modularJarName includeEmptyDirs = false from srcClassesDir } @@ -5237,8 +5221,8 @@ compileTargets { t -> // and the standalone sdk should be independent of one another, but seems // better than the alternatives. def zipSourceFilesTask = project.task("zipSourceFilesStandalone$t.capital", type: Zip, dependsOn: buildModulesTask) { - destinationDirectory = file("${standaloneLibDir}") - archiveFileName = standaloneSrcZipName + destinationDir = file("${standaloneLibDir}") + archiveName = standaloneSrcZipName includeEmptyDirs = false from modulesSrcDir include "**/*.java" @@ -5263,8 +5247,8 @@ compileTargets { t -> def modularEmptyPublicationJarName = "${moduleName}.jar" def modularEmptyPublicationJarTask = project.task("moduleEmptyPublicationJar${t.capital}", type: Jar) { - destinationDirectory = file("${dstModularJarDir}") - archiveFileName = modularEmptyPublicationJarName + destinationDir = file("${dstModularJarDir}") + archiveName = modularEmptyPublicationJarName manifest { attributes( 'Automatic-Module-Name':"${moduleName}Empty" @@ -5274,8 +5258,8 @@ compileTargets { t -> def modularPublicationJarName = "${moduleName}-${t.name}.jar" def modularPublicationJarTask = project.task("modularPublicationJar${t.capital}", type: Jar, dependsOn: modularEmptyPublicationJarTask) { - destinationDirectory = file("${dstModularJarDir}") - archiveFileName = modularPublicationJarName + destinationDir = file("${dstModularJarDir}") + archiveName = modularPublicationJarName from srcLibsDir from srcClassesDir } @@ -5695,8 +5679,8 @@ compileTargets { t -> file("${rootProject.buildDir}/${jfxBundle}").delete() } - archiveFileName = jfxBundle - destinationDirectory = file("${rootProject.buildDir}") + archiveName = jfxBundle + destinationDir = file("${rootProject.buildDir}") includeEmptyDirs = false from "${bundledSdkDir}" } --- a/build.properties +++ b/build.properties @@ -84,8 +84,8 @@ jfx.build.jdk.buildnum.min=46 # gradle/legal/gradle.md. # The jfx.gradle.version.min property defines the minimum version of gradle # that is supported. It must be <= jfx.gradle.version. -jfx.gradle.version=7.0.1 -jfx.gradle.version.min=6.3 +jfx.gradle.version=5.3 +jfx.gradle.version.min=4.8 # Toolchains jfx.build.linux.gcc.version=gcc10.3.0-OL6.4+1.0 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -60,10 +60,7 @@ repositories { if (buildClosed) { ivy { url jfxRepositoryURL - metadataSources { - artifact() - } - patternLayout { + layout "pattern", { artifact "[artifact]-[revision].[ext]" artifact "[artifact].[ext]" } @@ -74,7 +71,7 @@ repositories { } dependencies { - testImplementation group: "junit", name: "junit", version: "4.8.2" + testCompile group: "junit", name: "junit", version: "4.8.2" } // At the moment the ASM library shipped with Gradle that is used to --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/CCTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/CCTask.groovy @@ -23,16 +23,15 @@ * questions. */ -import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.Optional class CCTask extends NativeCompileTask { - @Input String compiler; - @Optional @Input List linkerOptions = new ArrayList(); + String compiler; + @Optional List linkerOptions = new ArrayList(); @Optional @InputDirectory File headers; - @Optional @Input Closure eachOutputFile; // will be given a File and must return a File - @Input boolean exe = false; + @Optional Closure eachOutputFile; // will be given a File and must return a File + @Optional boolean exe = false; protected File outputFile(File sourceFile) { final String outFileName = sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf(".")); --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/CompileResourceTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/CompileResourceTask.groovy @@ -23,11 +23,9 @@ * questions. */ -import org.gradle.api.tasks.Input - class CompileResourceTask extends NativeCompileTask { - @Input List rcParams = new ArrayList(); - @Input String compiler; + List rcParams = new ArrayList(); + String compiler; protected File outputFile(File sourceFile) { final String outFileName = sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf(".")); --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/ExportedSymbolsTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/ExportedSymbolsTask.groovy @@ -24,7 +24,6 @@ */ import org.gradle.api.DefaultTask -import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputFile @@ -33,7 +32,7 @@ import org.gradle.api.tasks.TaskAction class ExportedSymbolsTask extends DefaultTask { @OutputFile File outputFile; @InputDirectory File libDir; - @Optional @Input List excludes; + @Optional List excludes; @TaskAction void generateExportedSymbols() { --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/JavaHeaderTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/JavaHeaderTask.groovy @@ -26,7 +26,6 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.FileCollection import org.gradle.api.file.FileTree -import org.gradle.api.tasks.Input import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.util.PatternFilterable @@ -34,8 +33,8 @@ import org.gradle.api.tasks.util.PatternSet class JavaHeaderTask extends DefaultTask { @OutputDirectory File output; - @Input List sourceRoots = new ArrayList(); - @Input FileCollection classpath; + List sourceRoots = new ArrayList(); + FileCollection classpath; private final PatternFilterable patternSet = new PatternSet(); // @InputFiles public void setSource(Object source) { --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/LinkTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/LinkTask.groovy @@ -24,18 +24,16 @@ */ import org.gradle.api.DefaultTask -import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction class LinkTask extends DefaultTask { - @Input List linkParams = new ArrayList(); + List linkParams = new ArrayList(); @InputDirectory File objectDir; @OutputFile File lib; - @Input String linker; - + String linker; @TaskAction void compile() { // Link & generate the library (.dll, .so, .dylib) lib.getParentFile().mkdirs(); --- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy +++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy @@ -24,7 +24,6 @@ */ import org.gradle.api.DefaultTask -import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputDirectory @@ -39,9 +38,9 @@ import java.util.concurrent.Executors import java.util.concurrent.Future class NativeCompileTask extends DefaultTask { - @Optional @Input String matches; // regex for matching input files - @Input List params = new ArrayList(); - @Input List sourceRoots = new ArrayList(); + @Optional String matches; // regex for matching input files + List params = new ArrayList(); + List sourceRoots = new ArrayList(); @OutputDirectory File output; @InputFiles List allFiles = []; private final PatternFilterable patternSet = new PatternSet();