diff --git a/build.gradle b/build.gradle index c7a1428814..0a6da2a708 100644 --- a/build.gradle +++ b/build.gradle @@ -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 } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 758de960ec..28861d273a 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index debd024022..f73107db58 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/node/capsule/build.gradle b/node/capsule/build.gradle index 17cd8d6c0b..af22662a4e 100644 --- a/node/capsule/build.gradle +++ b/node/capsule/build.gradle @@ -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 '' } } diff --git a/tools/explorer/capsule/build.gradle b/tools/explorer/capsule/build.gradle index 757c9b503a..76d22baf52 100644 --- a/tools/explorer/capsule/build.gradle +++ b/tools/explorer/capsule/build.gradle @@ -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 { diff --git a/webserver/webcapsule/build.gradle b/webserver/webcapsule/build.gradle index 38a5765248..58a9d3325b 100644 --- a/webserver/webcapsule/build.gradle +++ b/webserver/webcapsule/build.gradle @@ -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 '' } }