Skip to content
Permalink
Browse files
8263760: Update gradle to version 7.0.1
8240336: JavaFX build uses deprecated features that will be removed in gradle 7
8262236: Configure Gradle checksum verification

Reviewed-by: kcr, jvos
Backport-of: 111bac4180a646662a81223bdbb56880789d5a90
  • Loading branch information
arapte committed Aug 23, 2021
1 parent efcf25e commit 80c06708932bc28b7d76cd40cad39c50422788bf
@@ -1732,15 +1732,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",
@@ -1853,9 +1853,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"
}
}

@@ -1952,9 +1952,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' ])
@@ -2028,10 +2028,10 @@ 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"
compile project(':base')
implementation project(':base')
}

project.ext.moduleSourcePath = defaultModuleSourcePath_GraphicsOne
@@ -2106,7 +2106,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"
@@ -2273,7 +2273,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")
@@ -2362,7 +2362,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",
@@ -2417,7 +2417,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()
@@ -2460,10 +2460,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 {
@@ -2542,8 +2542,8 @@ project(":swing") {
}

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

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

dependencies {
compile name: SWT_FILE_NAME
implementation name: SWT_FILE_NAME
}

classes {
@@ -2598,7 +2598,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
@@ -2662,10 +2662,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 {
@@ -2755,9 +2755,9 @@ project(":fxpackager") {
}

dependencies {
antpluginCompile group: "org.apache.ant", name: "ant", version: "1.8.2"
antpluginImplementation group: "org.apache.ant", name: "ant", version: "1.8.2"

testCompile project(":controls"),
testImplementation project(":controls"),
group: "org.apache.ant", name: "ant", version: "1.8.2",
sourceSets.antplugin.output
}
@@ -3327,8 +3327,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
@@ -3930,10 +3930,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
@@ -3942,8 +3942,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"
@@ -4121,7 +4121,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',
@@ -4139,8 +4139,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
@@ -4181,10 +4181,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' ]
@@ -4239,8 +4239,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/**")
@@ -4260,8 +4260,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/**")
@@ -4709,8 +4709,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/**")
@@ -4730,7 +4730,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}")
}
}

@@ -4896,17 +4898,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}"
@@ -5177,8 +5179,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
}
@@ -5234,8 +5236,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"
@@ -5260,8 +5262,8 @@ 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
manifest {
attributes(
'Automatic-Module-Name':"${moduleName}Empty"
@@ -5271,8 +5273,8 @@ compileTargets { t ->

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
}
@@ -5636,8 +5638,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=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=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
@Input boolean exe = false;

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

1 comment on commit 80c0670

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 80c0670 Aug 23, 2021

Please sign in to comment.