Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263760: Update gradle to version 7.0.1 #498

Closed
Closed
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
@@ -1819,15 +1819,15 @@ void addJCov(p, test) {
"exclude=\"**.*Test\"," +
"file=build/reports/jcov/report.xml," +
"merge=merge";
test.jvmArgs("-javaagent:${p.configurations.testCompile.files.find { it.name.startsWith('jcov') }}=$jcovJVMArgument");
test.jvmArgs("-javaagent:${p.configurations.testClasspath.files.find { it.name.startsWith('jcov') }}=$jcovJVMArgument");
p.mkdir p.file("build/reports/jcov")
}
test.doLast {
def reportFile = p.file("build/reports/jcov/report.xml")
if (reportFile.exists()) {
p.javaexec {
workingDir = p.file("build/reports/jcov")
classpath = p.files(p.configurations.testCompile.files.find { it.name.startsWith('jcov') })
classpath = p.files(p.configurations.testClasspath.files.find { it.name.startsWith('jcov') })
main = "com.sun.tdk.jcov.Helper"
args = [
"RepGen",
@@ -1940,9 +1940,9 @@ allprojects {
// By default all of our projects require junit for testing so we can just
// setup this dependency here.
dependencies {
testCompile group: "junit", name: "junit", version: "4.8.2"
testImplementation group: "junit", name: "junit", version: "4.8.2"
if (BUILD_CLOSED && DO_JCOV) {
testCompile name: "jcov"
testImplementation name: "jcov"
}
}

@@ -2029,9 +2029,9 @@ project(":base") {
}

dependencies {
testCompile group: "junit", name: "junit", version: "4.8.2"
testCompile sourceSets.main.output
testCompile sourceSets.shims.output
testImplementation group: "junit", name: "junit", version: "4.8.2"
testImplementation sourceSets.main.output
testImplementation sourceSets.shims.output
}

commonModuleSetup(project, [ 'base' ])
@@ -2105,11 +2105,11 @@ project(":graphics") {
}

dependencies {
stubCompile group: "junit", name: "junit", version: "4.8.2"
stubImplementation group: "junit", name: "junit", version: "4.8.2"

antlr group: "org.antlr", name: "antlr4", version: "4.7.2", classifier: "complete"
testCompile project(":base").sourceSets.test.output
compile project(':base')
testImplementation project(":base").sourceSets.test.output
implementation project(':base')
}

project.ext.moduleSourcePath = defaultModuleSourcePath_GraphicsOne
@@ -2191,7 +2191,7 @@ project(":graphics") {
project.task("compileFullJava", type: JavaCompile, dependsOn: processShaders) {
description = "Compile all of the graphics java classes - main and shaders"

classpath = configurations.compile
classpath = configurations.compileClasspath

source = project.sourceSets.main.java.srcDirs
source += "$buildDir/gensrc/java"
@@ -2360,7 +2360,7 @@ project(":graphics") {
executable = JAVA
workingDir = project.projectDir
main = settings.generator
classpath = configurations.compile + configurations.antlr
classpath = configurations.compileClasspath + configurations.antlr
classpath += files(project.sourceSets.jslc.java.outputDir)

classpath += files("${project.projectDir}/src/jslc/resources")
@@ -2449,7 +2449,7 @@ project(":graphics") {
executable = JAVA
workingDir = project.projectDir
main = "CompileJSL"
classpath = configurations.compile + configurations.antlr
classpath = configurations.compileClasspath + configurations.antlr
classpath += files(project.sourceSets.jslc.java.outputDir)
classpath += files(project.sourceSets.jslc.resources)
classpath += files("$buildDir/classes/jsl-compilers/prism",
@@ -2504,7 +2504,7 @@ project(":graphics") {
}
if (allLibsPresent) return;

for (File f : [configurations.compile.files, configurations.antlr.files].flatten()) {
for (File f : [configurations.compileClasspath.files, configurations.antlr.files].flatten()) {
copy {
into libsDir
from f.getParentFile()
@@ -2548,10 +2548,10 @@ project(":controls") {
commonModuleSetup(project, [ 'base', 'graphics', 'controls' ])

dependencies {
testCompile project(":graphics").sourceSets.test.output
testCompile project(":base").sourceSets.test.output
compile project(':base')
compile project(':graphics')
testImplementation project(":graphics").sourceSets.test.output
testImplementation project(":base").sourceSets.test.output
implementation project(':base')
implementation project(':graphics')
}

test {
@@ -2627,8 +2627,8 @@ project(":swing") {
commonModuleSetup(project, [ 'base', 'graphics', 'swing' ])

dependencies {
compile project(":base")
compile project(":graphics")
implementation project(":base")
implementation project(":graphics")
}

test {
@@ -2653,7 +2653,7 @@ project(":swt") {
commonModuleSetup(project, [ 'base', 'graphics' ])

dependencies {
compile name: SWT_FILE_NAME
implementation name: SWT_FILE_NAME
}

classes {
@@ -2666,7 +2666,7 @@ project(":swt") {
// Skip copy if file is present.
if (swtLib.exists()) return;

for (File f : configurations.compile.files) {
for (File f : configurations.compileClasspath.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
@@ -2732,10 +2732,10 @@ project(":fxml") {


dependencies {
testCompile project(":graphics").sourceSets.test.output
testCompile project(":base").sourceSets.test.output
compile project(":base")
compile project(":graphics")
testImplementation project(":graphics").sourceSets.test.output
testImplementation project(":base").sourceSets.test.output
implementation project(":base")
implementation project(":graphics")
}

test {
@@ -2784,8 +2784,8 @@ project(":media") {
media name: "ffmpeg-3.3.3", ext: "tar.gz"
media name: "ffmpeg-4.0.2", ext: "tar.gz"
}
compile project(":base")
compile project(":graphics")
implementation project(":base")
implementation project(":graphics")
}

compileJava.dependsOn updateCacheIfNeeded
@@ -3391,10 +3391,10 @@ project(":web") {
if (IS_COMPILE_WEBKIT) {
icu name: "icu4c-${icuVersion}-data-bin-l", ext: "zip"
}
compile project(":base")
compile project(":graphics")
compile project(":controls")
compile project(":media")
implementation project(":base")
implementation project(":graphics")
implementation project(":controls")
implementation project(":media")
}

compileJava.dependsOn updateCacheIfNeeded
@@ -3403,8 +3403,8 @@ project(":web") {
from (project.file("$projectDir/src/test/resources/test/html")) {
include "**/archive-*.*"
}
archiveName = "webArchiveJar.jar"
destinationDir = file("$buildDir/testing/resources")
archiveFileName = "webArchiveJar.jar"
destinationDirectory = file("$buildDir/testing/resources")
}

def gensrcDir = "${buildDir}/gensrc/java"
@@ -3589,7 +3589,7 @@ project(":web") {
def compileJavaDOMBindingTask = task("compileJavaDOMBinding${t.capital}", type: JavaCompile,
dependsOn: [compileJava, compileNativeTask, copyNativeTask]) {
destinationDir = file("$buildDir/classes/java/main")
classpath = configurations.compile
classpath = configurations.compileClasspath
source = project.sourceSets.main.java.srcDirs
options.compilerArgs.addAll([
'-implicit:none',
@@ -3607,8 +3607,8 @@ project(":web") {

def drtClasses = "**/com/sun/javafx/webkit/drt/**"
task drtJar(type: Jar, dependsOn: compileJava) {
archiveName = "drt.jar"
destinationDir = file("$buildDir/test")
archiveFileName = "drt.jar"
destinationDirectory = file("$buildDir/test")
from "$buildDir/classes/java/main/javafx.web/"
include drtClasses
includeEmptyDirs = false
@@ -3668,10 +3668,10 @@ project(":systemTests") {
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
testImplementation project(":graphics").sourceSets.test.output
testImplementation project(":base").sourceSets.test.output
testImplementation project(":controls").sourceSets.test.output
testImplementation project(":swing").sourceSets.test.output
}

def dependentProjects = [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ]
@@ -3726,8 +3726,8 @@ project(":systemTests") {
dependsOn compileTestapp1Java
enabled = IS_FULL_TEST

destinationDir = file("$buildDir/testapp1")
archiveName = testapp1JarName
destinationDirectory = file("$buildDir/testapp1")
archiveFileName = testapp1JarName
includeEmptyDirs = false
from project.sourceSets.testapp1.java.outputDir
include("testapp/**")
@@ -3747,8 +3747,8 @@ project(":systemTests") {
dependsOn compileTestapp1Java
enabled = IS_FULL_TEST

destinationDir = file("$buildDir/testapp1")
archiveName = "jar2.jar";
destinationDirectory = file("$buildDir/testapp1")
archiveFileName = "jar2.jar";
includeEmptyDirs = false
from project.sourceSets.testapp1.java.outputDir
include("pkg2/**")
@@ -4188,8 +4188,8 @@ compileTargets { t ->
enabled = COMPILE_SWT
group = "Basic"
description = "Creates the javafx-swt.jar for the $t.name target"
destinationDir = file("${project(":swt").buildDir}/libs")
archiveName = "javafx-swt.jar"
destinationDirectory = file("${project(":swt").buildDir}/libs")
archiveFileName = "javafx-swt.jar"
includeEmptyDirs = false
from("${project(":swt").buildDir}/classes/java/main");
include("**/javafx/embed/swt/**")
@@ -4209,7 +4209,9 @@ compileTargets { t ->
dependsOn(javafxSwtTask)

doLast() {
ant.jar (update: true, index: true, destfile: "${javafxSwtTask.destinationDir}/${javafxSwtTask.archiveName}")
def destDir = javafxSwtTask.destinationDirectory.get()
def afName = javafxSwtTask.archiveFileName.get()
ant.jar (update: true, index: true, destfile: "${destDir}/${afName}")
}
}

@@ -4376,17 +4378,17 @@ compileTargets { t ->
zipsTask.dependsOn(zipSdkTask)

def zipDocsTask = task("zipDocs$t.capital", type: Zip, dependsOn: zipSdkTask) {
destinationDir = file("${bundlesDir}")
archiveName = "${docsBundleName}.zip"
destinationDirectory = file("${bundlesDir}")
archiveFileName = "${docsBundleName}.zip"
includeEmptyDirs = false
from docsArtifactsDir
into "${docsBundleName}"
}
zipsTask.dependsOn(zipDocsTask)

def zipJmodsTask = task("zipJmods$t.capital", type: Zip, dependsOn: zipDocsTask) {
destinationDir = file("${bundlesDir}")
archiveName = "${jmodsBundleName}.zip"
destinationDirectory = file("${bundlesDir}")
archiveFileName = "${jmodsBundleName}.zip"
includeEmptyDirs = false
from jmodsArtifactsDir
into "${jmodsBundleName}"
@@ -4684,8 +4686,8 @@ compileTargets { t ->
def dstModularJarDir = "${standaloneLibDir}"
def modularJarName = "${moduleName}.jar"
def modularJarTask = project.task("modularJarStandalone$t.capital", type: Jar, dependsOn: project.assemble) {
destinationDir = file("${dstModularJarDir}")
archiveName = modularJarName
destinationDirectory = file("${dstModularJarDir}")
archiveFileName = modularJarName
includeEmptyDirs = false
from srcClassesDir
}
@@ -4741,8 +4743,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) {
destinationDir = file("${standaloneLibDir}")
archiveName = standaloneSrcZipName
destinationDirectory = file("${standaloneLibDir}")
archiveFileName = standaloneSrcZipName
includeEmptyDirs = false
from modulesSrcDir
include "**/*.java"
@@ -4767,14 +4769,14 @@ compileTargets { t ->

def modularEmptyPublicationJarName = "${moduleName}.jar"
def modularEmptyPublicationJarTask = project.task("moduleEmptyPublicationJar${t.capital}", type: Jar) {
destinationDir = file("${dstModularJarDir}")
archiveName = modularEmptyPublicationJarName
destinationDirectory = file("${dstModularJarDir}")
archiveFileName = modularEmptyPublicationJarName
}

def modularPublicationJarName = "${moduleName}-${t.name}.jar"
def modularPublicationJarTask = project.task("modularPublicationJar${t.capital}", type: Jar, dependsOn: modularEmptyPublicationJarTask) {
destinationDir = file("${dstModularJarDir}")
archiveName = modularPublicationJarName
destinationDirectory = file("${dstModularJarDir}")
archiveFileName = modularPublicationJarName
from srcLibsDir
from srcClassesDir
}
@@ -5108,8 +5110,8 @@ compileTargets { t ->
file("${rootProject.buildDir}/${jfxBundle}").delete()
}

archiveName = jfxBundle
destinationDir = file("${rootProject.buildDir}")
archiveFileName = jfxBundle
destinationDirectory = file("${rootProject.buildDir}")
includeEmptyDirs = false
from "${bundledSdkDir}"
}
@@ -84,8 +84,8 @@ jfx.build.jdk.buildnum.min=28
# 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=6.3
jfx.gradle.version.min=5.3
jfx.gradle.version=7.0.1
jfx.gradle.version.min=6.3

# Toolchains
jfx.build.linux.gcc.version=gcc10.3.0-OL6.4+1.0
@@ -74,7 +74,7 @@ repositories {
}

dependencies {
testCompile group: "junit", name: "junit", version: "4.8.2"
testImplementation group: "junit", name: "junit", version: "4.8.2"
}

// At the moment the ASM library shipped with Gradle that is used to
@@ -23,15 +23,16 @@
* questions.
*/

import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.Optional

class CCTask extends NativeCompileTask {
String compiler;
@Optional List<String> linkerOptions = new ArrayList<String>();
@Input String compiler;
@Optional @Input List<String> linkerOptions = new ArrayList<String>();
@Optional @InputDirectory File headers;
@Optional Closure eachOutputFile; // will be given a File and must return a File
@Optional boolean exe = false;
@Optional @Input Closure eachOutputFile; // will be given a File and must return a File

This comment has been minimized.

Loading
@Crazyjavahacking

Crazyjavahacking May 12, 2021

Is this field actually used anywhere?

As this field is not initialized + there is the @Optional annotation, Gradle will not verify this is fine. Gradle docs is specifying that:

  1. @Input can be used on Closure if it is a provider of File (which means no param in closure).
  2. @Input can be used for any Serializable which Closure actually is.

It's not obvious if Gradle will correctly handle Closure taking argument.

This comment has been minimized.

Loading
@kevinrushforth

kevinrushforth May 12, 2021
Author Member

I'll take a look, but I will likely want to do any cleanup of this in a follow-on issue. As you note the eachOutputFile property is unused...as is the exe property. They were formerly used by one of the javapackager tasks, which has since been removed.

@Input boolean exe = false;

protected File outputFile(File sourceFile) {
final String outFileName = sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf("."));
@@ -23,9 +23,11 @@
* questions.
*/

import org.gradle.api.tasks.Input

class CompileResourceTask extends NativeCompileTask {
List<String> rcParams = new ArrayList<String>();
String compiler;
@Input List<String> rcParams = new ArrayList<String>();
@Input String compiler;

protected File outputFile(File sourceFile) {
final String outFileName = sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf("."));
Loading