From 1463cd2b3780c228c544fcc34bb5636c7b6428d1 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Tue, 6 Dec 2016 13:34:04 +0000 Subject: [PATCH] Renamec capsule module to corda. --- build.gradle | 4 ++-- docs/source/example-code/build.gradle | 4 ++-- gradle-plugins/build.gradle | 11 +---------- gradle-plugins/publish-utils/build.gradle | 3 +++ .../main/groovy/net/corda/plugins/PublishTasks.groovy | 10 ++++++++++ node/{capsule => corda}/build.gradle | 9 +++++---- samples/attachment-demo/build.gradle | 2 +- samples/irs-demo/build.gradle | 2 +- samples/network-visualiser/build.gradle | 2 +- samples/raft-notary-demo/build.gradle | 2 +- samples/simm-valuation-demo/build.gradle | 2 +- samples/trader-demo/build.gradle | 2 +- settings.gradle | 2 +- 13 files changed, 30 insertions(+), 25 deletions(-) rename node/{capsule => corda}/build.gradle (94%) diff --git a/build.gradle b/build.gradle index 9b345df920..e3f176c856 100644 --- a/build.gradle +++ b/build.gradle @@ -92,7 +92,7 @@ repositories { dependencies { compile project(':node') compile "com.google.guava:guava:19.0" - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') } task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { @@ -162,7 +162,7 @@ bintrayConfig { projectUrl = 'https://github.com/corda/corda' gpgSign = true gpgPassphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE') - publications = ['client', 'core', 'finance', 'node', 'test-utils'] + publications = ['client', 'core', 'corda', 'finance', 'node', 'test-utils'] license { name = 'Apache-2.0' url = 'https://www.apache.org/licenses/LICENSE-2.0' diff --git a/docs/source/example-code/build.gradle b/docs/source/example-code/build.gradle index 9bc0aeb012..08ad1593e4 100644 --- a/docs/source/example-code/build.gradle +++ b/docs/source/example-code/build.gradle @@ -36,7 +36,7 @@ sourceSets { } } -compileTestJava.dependsOn tasks.getByPath(':node:capsule:buildCordaJAR') +compileTestJava.dependsOn tasks.getByPath(':node:corda:buildCordaJAR') dependencies { compile project(':core') @@ -48,7 +48,7 @@ dependencies { exclude group: "bouncycastle" } - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') } mainClassName = "net.corda.docs.ClientRpcTutorialKt" diff --git a/gradle-plugins/build.gradle b/gradle-plugins/build.gradle index 7a15cb8840..7c7a233f76 100644 --- a/gradle-plugins/build.gradle +++ b/gradle-plugins/build.gradle @@ -16,7 +16,6 @@ buildscript { } } -apply plugin: 'maven-publish' apply plugin: 'net.corda.plugins.publish-utils' allprojects { @@ -24,10 +23,6 @@ allprojects { group 'net.corda.plugins' } -subprojects { - task(install, dependsOn: 'publishToMavenLocal') -} - bintrayConfig { user = System.getenv('CORDA_BINTRAY_USER') key = System.getenv('CORDA_BINTRAY_KEY') @@ -49,8 +44,4 @@ bintrayConfig { name = 'R3' email = 'dev@corda.net' } -} - -// Aliasing the publishToMavenLocal for simplicity. -task(install, dependsOn: 'publishToMavenLocal') - +} \ No newline at end of file diff --git a/gradle-plugins/publish-utils/build.gradle b/gradle-plugins/publish-utils/build.gradle index bdaff87a9e..430696ee1a 100644 --- a/gradle-plugins/publish-utils/build.gradle +++ b/gradle-plugins/publish-utils/build.gradle @@ -81,3 +81,6 @@ publishing { } } } + +// Aliasing the publishToMavenLocal for simplicity. +task(install, dependsOn: 'publishToMavenLocal') diff --git a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/PublishTasks.groovy b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/PublishTasks.groovy index 46bf6d0dc4..5eb9637c2f 100644 --- a/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/PublishTasks.groovy +++ b/gradle-plugins/publish-utils/src/main/groovy/net/corda/plugins/PublishTasks.groovy @@ -24,6 +24,7 @@ class PublishTasks implements Plugin { createTasks() createExtensions() + createConfigurations() checkAndConfigurePublishing() } @@ -53,6 +54,11 @@ class PublishTasks implements Plugin { artifact project.tasks.sourceJar artifact project.tasks.javadocJar + project.configurations.publish.artifacts.each { + println("Adding artifact: $it") + delegate.artifact it + } + extendPomForMavenCentral(pom, bintrayConfig) } project.task("install", dependsOn: "publishToMavenLocal") @@ -125,4 +131,8 @@ class PublishTasks implements Plugin { project.extensions.create("bintrayConfig", BintrayConfigExtension) } } + + void createConfigurations() { + project.configurations.create("publish") + } } diff --git a/node/capsule/build.gradle b/node/corda/build.gradle similarity index 94% rename from node/capsule/build.gradle rename to node/corda/build.gradle index 4f2b0d2e3f..fd61034097 100644 --- a/node/capsule/build.gradle +++ b/node/corda/build.gradle @@ -5,9 +5,7 @@ apply plugin: 'net.corda.plugins.publish-utils' apply plugin: 'us.kirchmeier.capsule' apply plugin: 'maven-publish' -apply plugin: 'com.jfrog.bintray' -//name 'corda' description 'Corda standalone node' repositories { @@ -37,12 +35,12 @@ targetCompatibility = 1.6 sourceSets { test { resources { - srcDir "../config/test" + srcDir "../../config/test" } } main { resources { - srcDir "../config/dev" + srcDir "../../config/dev" } } } @@ -75,4 +73,7 @@ task buildCertSigningRequestUtilityJAR(type: FatCapsule, dependsOn: project.jar) artifacts { runtimeArtifacts buildCordaJAR + publish buildCordaJAR { + classifier "" + } } \ No newline at end of file diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 89991bc556..dccad3dce0 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -45,7 +45,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 0400939e62..67d273888e 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -48,7 +48,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/samples/network-visualiser/build.gradle b/samples/network-visualiser/build.gradle index 5a0169a4ec..ce2184b414 100644 --- a/samples/network-visualiser/build.gradle +++ b/samples/network-visualiser/build.gradle @@ -21,7 +21,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/samples/raft-notary-demo/build.gradle b/samples/raft-notary-demo/build.gradle index c0ed340679..5707e7a24e 100644 --- a/samples/raft-notary-demo/build.gradle +++ b/samples/raft-notary-demo/build.gradle @@ -45,7 +45,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index d444858e82..53c5f1ea8d 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -41,7 +41,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index 403f5b879b..aac811f0f6 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -45,7 +45,7 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // Corda integration dependencies - runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts') + runtime project(path: ":node:corda", configuration: 'runtimeArtifacts') compile project(':core') compile project(':client') compile project(':node') diff --git a/settings.gradle b/settings.gradle index b63878100e..34a1a51567 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,7 +5,7 @@ include 'finance' include 'finance:isolated' include 'core' include 'node' -include 'node:capsule' +include 'node:corda' include 'client' include 'experimental' include 'experimental:sandbox'