diff --git a/build.gradle b/build.gradle index 78cd549ab6..5b40369ba7 100644 --- a/build.gradle +++ b/build.gradle @@ -254,7 +254,7 @@ bintrayConfig { projectUrl = 'https://github.com/corda/corda' gpgSign = true gpgPassphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE') - publications = ['jfx', 'mock', 'rpc', 'core', 'corda', 'cordform-common', 'corda-webserver', 'finance', 'node', 'node-api', 'node-schemas', 'test-utils', 'jackson', 'verifier', 'webserver'] + publications = ['corda-jfx', 'corda-mock', 'corda-rpc', 'corda-core', 'corda', 'cordform-common', 'corda-finance', 'corda-node', 'corda-node-api', 'corda-node-schemas', 'corda-test-utils', 'corda-jackson', 'corda-verifier', 'corda-webserver-impl', 'corda-webserver'] license { name = 'Apache-2.0' url = 'https://www.apache.org/licenses/LICENSE-2.0' diff --git a/client/jackson/build.gradle b/client/jackson/build.gradle index 9a7f6a6306..b1b1591768 100644 --- a/client/jackson/build.gradle +++ b/client/jackson/build.gradle @@ -23,3 +23,11 @@ dependencies { testCompile "com.pholser:junit-quickcheck-core:$quickcheck_version" testCompile "com.pholser:junit-quickcheck-generators:$quickcheck_version" } + +jar { + baseName 'corda-jackson' +} + +publish { + name = jar.baseName +} \ No newline at end of file diff --git a/client/jfx/build.gradle b/client/jfx/build.gradle index ba6ae045c5..69f39972c6 100644 --- a/client/jfx/build.gradle +++ b/client/jfx/build.gradle @@ -55,3 +55,11 @@ task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath } + +jar { + baseName 'corda-jfx' +} + +publish { + name = jar.baseName +} \ No newline at end of file diff --git a/client/mock/build.gradle b/client/mock/build.gradle index adac270b39..3b278fcbba 100644 --- a/client/mock/build.gradle +++ b/client/mock/build.gradle @@ -23,3 +23,11 @@ dependencies { testCompile project(':test-utils') } + +jar { + baseName 'corda-mock' +} + +publish { + name = jar.baseName +} \ No newline at end of file diff --git a/client/rpc/build.gradle b/client/rpc/build.gradle index 95f0ed0fcc..7a6e7f6688 100644 --- a/client/rpc/build.gradle +++ b/client/rpc/build.gradle @@ -78,3 +78,11 @@ task smokeTest(type: Test) { classpath = sourceSets.smokeTest.runtimeClasspath systemProperties['build.dir'] = buildDir } + +jar { + baseName 'corda-rpc' +} + +publish { + name = jar.baseName +} \ No newline at end of file diff --git a/constants.properties b/constants.properties index 975d27b7a1..20285f8fef 100644 --- a/constants.properties +++ b/constants.properties @@ -1,4 +1,4 @@ -gradlePluginsVersion=0.12.3 +gradlePluginsVersion=0.12.4 kotlinVersion=1.1.2 guavaVersion=21.0 bouncycastleVersion=1.56 diff --git a/core/build.gradle b/core/build.gradle index 131f8acf86..4f972786e7 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -91,3 +91,11 @@ task testJar(type: Jar) { artifacts { testArtifacts testJar } + +jar { + baseName 'corda-core' +} + +publish { + name = jar.baseName +} diff --git a/finance/build.gradle b/finance/build.gradle index e7cf52b57d..6b9870ed39 100644 --- a/finance/build.gradle +++ b/finance/build.gradle @@ -29,3 +29,11 @@ configurations.testCompile { // TODO: Remove this exclusion once junit-quickcheck 0.8 is released. exclude group: 'javassist', module: 'javassist' } + +jar { + baseName 'corda-finance' +} + +publish { + name = jar.baseName +} \ No newline at end of file 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 8dd3346432..f5221ff037 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 @@ -60,11 +60,6 @@ class PublishTasks implements Plugin { void configureMavenPublish(BintrayConfigExtension bintrayConfig) { project.apply([plugin: 'maven-publish']) project.publishing.publications.create(publishName, MavenPublication) { - if(!publishConfig.disableDefaultJar && !publishConfig.publishWar) { - from project.components.java - } else if(publishConfig.publishWar) { - from project.components.web - } groupId project.group artifactId publishName @@ -76,6 +71,12 @@ class PublishTasks implements Plugin { delegate.artifact it } + if (!publishConfig.disableDefaultJar && !publishConfig.publishWar) { + from project.components.java + } else if (publishConfig.publishWar) { + from project.components.web + } + extendPomForMavenCentral(pom, bintrayConfig) } project.task("install", dependsOn: "publishToMavenLocal") diff --git a/gradle-plugins/settings.gradle b/gradle-plugins/settings.gradle index 061db29b3a..990b7b284c 100644 --- a/gradle-plugins/settings.gradle +++ b/gradle-plugins/settings.gradle @@ -3,4 +3,5 @@ include 'publish-utils' include 'quasar-utils' include 'cordformation' include 'cordform-common' -project(':cordform-common').projectDir = new File("$settingsDir/../cordform-common") +// TODO: Look into `includeFlat` +project(':cordform-common').projectDir = new File("$settingsDir/../cordform-common") \ No newline at end of file diff --git a/node-api/build.gradle b/node-api/build.gradle index 4e046c12d7..08ef79ae79 100644 --- a/node-api/build.gradle +++ b/node-api/build.gradle @@ -31,3 +31,11 @@ dependencies { testCompile "org.assertj:assertj-core:${assertj_version}" testCompile project(':test-utils') } + +jar { + baseName 'corda-node-api' +} + +publish { + name = jar.baseName +} diff --git a/node-schemas/build.gradle b/node-schemas/build.gradle index 70faf99703..5026633777 100644 --- a/node-schemas/build.gradle +++ b/node-schemas/build.gradle @@ -9,7 +9,6 @@ dependencies { compile project(':core') testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "junit:junit:$junit_version" - testCompile project(':test-utils') // Requery: SQL based query & persistence for Kotlin kapt "io.requery:requery-processor:$requery_version" @@ -24,4 +23,12 @@ sourceSets { srcDir "$buildDir/generated/source/kapt/main" } } +} + +jar { + baseName 'corda-node-schemas' +} + +publish { + name = jar.baseName } \ No newline at end of file diff --git a/node/build.gradle b/node/build.gradle index 1de49eee07..f81f9b4044 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -174,3 +174,11 @@ task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath } + +jar { + baseName 'corda-node' +} + +publish { + name = jar.baseName +} \ No newline at end of file diff --git a/test-utils/build.gradle b/test-utils/build.gradle index 8209fea019..259e69698d 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -34,3 +34,11 @@ dependencies { // OkHTTP: Simple HTTP library. compile "com.squareup.okhttp3:okhttp:$okhttp_version" } + +jar { + baseName 'corda-test-utils' +} + +publish { + name = jar.baseName +} diff --git a/verifier/build.gradle b/verifier/build.gradle index 81747b43c3..db63013972 100644 --- a/verifier/build.gradle +++ b/verifier/build.gradle @@ -67,4 +67,13 @@ task integrationTest(type: Test) { classpath = sourceSets.integrationTest.runtimeClasspath } -build.dependsOn standaloneJar +artifacts { + publish standaloneJar { + classifier "" + } +} + +publish { + name = 'corda-verifier' + disableDefaultJar = true +} diff --git a/webserver/build.gradle b/webserver/build.gradle index 0cb4d9452b..7fe68cfbe2 100644 --- a/webserver/build.gradle +++ b/webserver/build.gradle @@ -65,3 +65,11 @@ task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath } + +jar { + baseName 'corda-webserver-impl' +} + +publish { + name = jar.baseName +}