CORDA-1964: Upgrade to Gradle 4.10 (#3903)

This commit is contained in:
Chris Rankin 2018-09-06 12:48:31 +01:00 committed by GitHub
parent 536ecdfe67
commit ca9649ec0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 27 deletions

View File

@ -430,6 +430,6 @@ if (file('corda-docs-only-build').exists() || (System.getenv('CORDA_DOCS_ONLY_BU
}
wrapper {
gradleVersion = "4.8.1"
gradleVersion = "4.10"
distributionType = Wrapper.DistributionType.ALL
}

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -9,7 +9,7 @@ apply plugin: 'com.jfrog.artifactory'
description 'Corda standalone node'
configurations {
runtimeArtifacts.extendsFrom runtime
runtimeArtifacts.extendsFrom runtimeClasspath
capsuleRuntime
}
@ -26,18 +26,20 @@ dependencies {
sourceCompatibility = 1.6
targetCompatibility = 1.6
task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
jar.enabled = false
task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
applicationClass 'net.corda.node.Corda'
archiveName "corda-${corda_release_version}.jar"
applicationSource = files(
project(':node').configurations.runtime,
project(':node').jar,
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
"$rootDir/config/dev/log4j2.xml",
"$rootDir/node/build/resources/main/reference.conf"
project(':node').configurations.runtimeClasspath,
project(':node').tasks.jar,
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
project(':node').buildDir.toString() + '/resources/main/reference.conf',
"$rootDir/config/dev/log4j2.xml",
'NOTICE' // Copy CDDL notice
)
from 'NOTICE' // Copy CDDL notice
from configurations.capsuleRuntime.files.collect { zipTree(it) }
capsuleManifest {
@ -61,12 +63,12 @@ task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
}
}
build.dependsOn buildCordaJAR
assemble.dependsOn buildCordaJAR
artifacts {
runtimeArtifacts buildCordaJAR
publish buildCordaJAR {
classifier ""
classifier ''
}
}

View File

@ -8,7 +8,7 @@ apply plugin: 'com.jfrog.artifactory'
description 'Node Explorer'
configurations {
runtimeArtifacts.extendsFrom runtime
runtimeArtifacts.extendsFrom runtimeClasspath
}
// Force the Caplet to target Java 6. This ensures that running 'java -jar explorer.jar' on any Java 6 VM upwards
@ -19,12 +19,12 @@ configurations {
sourceCompatibility = 1.6
targetCompatibility = 1.6
task buildExplorerJAR(type: FatCapsule, dependsOn: project(':tools:explorer').compileJava) {
task buildExplorerJAR(type: FatCapsule, dependsOn: project(':tools:explorer').tasks.jar) {
applicationClass 'net.corda.explorer.Main'
archiveName "node-explorer-${corda_release_version}.jar"
applicationSource = files(
project(':tools:explorer').configurations.runtime,
project(':tools:explorer').jar,
project(':tools:explorer').configurations.runtimeClasspath,
project(':tools:explorer').tasks.jar,
project(':tools:explorer').sourceSets.main.java.outputDir.toString() + '/ExplorerCaplet.class'
)
classifier 'fat'
@ -54,6 +54,7 @@ artifacts {
jar {
classifier "ignore"
enabled = false
}
publish {

View File

@ -1,6 +1,6 @@
/**
* This build.gradle exists to publish our capsule (executable fat jar) to maven. It cannot be placed in the
* node project because the bintray plugin cannot publish two modules from one project.
* webserver project because the bintray plugin cannot publish two modules from one project.
*/
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'us.kirchmeier.capsule'
@ -26,18 +26,20 @@ dependencies {
sourceCompatibility = 1.6
targetCompatibility = 1.6
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').compileJava) {
jar.enabled = false
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
applicationClass 'net.corda.webserver.WebServer'
archiveName "corda-webserver-${corda_release_version}.jar"
applicationSource = files(
project(':webserver').configurations.runtime,
project(':webserver').jar,
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
"$rootDir/config/dev/log4j2.xml",
"$rootDir/node/build/resources/main/reference.conf"
project(':webserver').configurations.runtimeClasspath,
project(':webserver').tasks.jar,
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
project(':node').buildDir.toString() + '/resources/main/reference.conf',
"$rootDir/config/dev/log4j2.xml",
project(':node:capsule').projectDir.toString() + '/NOTICE' // Copy CDDL notice
)
from 'NOTICE' // Copy CDDL notice
from configurations.capsuleRuntime.files.collect { zipTree(it) }
capsuleManifest {
@ -57,10 +59,12 @@ task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').compileJava
}
}
assemble.dependsOn buildWebserverJar
artifacts {
runtimeArtifacts buildWebserverJar
publish buildWebserverJar {
classifier ""
classifier ''
}
}