Corda now publishes with updated publish utils.

This commit is contained in:
Clinton Alexander 2016-12-06 10:49:46 +00:00
parent 4b2d786724
commit bf49dda731
9 changed files with 64 additions and 385 deletions

View File

@ -1,7 +1,7 @@
buildscript { buildscript {
// Our version: bump this on release. // Our version: bump this on release.
ext.corda_version = "0.7-SNAPSHOT" ext.corda_version = "0.7-SNAPSHOT"
ext.gradle_plugins_version = "0.6.1" ext.gradle_plugins_version = "0.6.2"
ext.kotlin_version = '1.0.5' ext.kotlin_version = '1.0.5'
ext.quasar_version = '0.7.6' ext.quasar_version = '0.7.6'
ext.asm_version = '0.5.3' ext.asm_version = '0.5.3'
@ -45,6 +45,7 @@ apply plugin: 'kotlin'
apply plugin: 'project-report' apply plugin: 'project-report'
apply plugin: 'com.github.ben-manes.versions' apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'net.corda.plugins.quasar-utils' apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
@ -154,3 +155,26 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
// Aliasing the publishToMavenLocal for simplicity. // Aliasing the publishToMavenLocal for simplicity.
task(install, dependsOn: 'publishToMavenLocal') task(install, dependsOn: 'publishToMavenLocal')
bintrayConfig {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
repo = 'corda'
org = 'r3'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/corda/corda'
projectUrl = 'https://github.com/corda/corda'
gpgSign = true
gpgPassphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
publications = ['client', 'core', 'finance', 'node', 'test-utils']
license {
name = 'Apache-2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0'
distribution = 'repo'
}
developer {
id = 'R3'
name = 'R3'
email = 'dev@corda.net'
}
}

View File

@ -4,6 +4,8 @@ apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
description 'Corda client modules'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -74,63 +76,3 @@ task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath classpath = sourceSets.integrationTest.runtimeClasspath
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['client']
dryRun = false
pkg {
repo = 'corda'
name = 'client'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
client(MavenPublication) {
from components.java
artifactId 'client'
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'client'
description 'Corda client modules'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}

View File

@ -4,14 +4,14 @@ apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
description 'Corda core'
buildscript { buildscript {
repositories { repositories {
mavenCentral() mavenCentral()
} }
} }
// apply plugin: 'org.jetbrains.dokka'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -91,63 +91,3 @@ dependencies {
// RS API: Response type and codes for ApiUtils. // RS API: Response type and codes for ApiUtils.
compile "javax.ws.rs:javax.ws.rs-api:2.0" compile "javax.ws.rs:javax.ws.rs-api:2.0"
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['core']
dryRun = false
pkg {
repo = 'corda'
name = 'core'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
core(MavenPublication) {
from components.java
artifactId 'core'
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'core'
description 'Core core'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}

View File

@ -5,6 +5,8 @@ apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
description 'Corda finance modules'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -31,63 +33,3 @@ sourceSets {
} }
} }
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['finance']
dryRun = false
pkg {
repo = 'corda'
name = 'finance'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
finance(MavenPublication) {
from components.java
artifactId 'finance'
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'finance'
description 'Corda finance modules'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}

View File

@ -1,5 +1,4 @@
apply plugin: 'groovy' apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'net.corda.plugins.publish-utils' apply plugin: 'net.corda.plugins.publish-utils'
description 'A small gradle plugin for adding some basic Quasar tasks and configurations to reduce build.gradle bloat.' description 'A small gradle plugin for adding some basic Quasar tasks and configurations to reduce build.gradle bloat.'

View File

@ -24,13 +24,21 @@ class PublishTasks implements Plugin<Project> {
createTasks() createTasks()
createExtensions() createExtensions()
checkAndApplyPublishing()
}
void checkAndApplyPublishing() {
def bintrayConfig = project.rootProject.extensions.findByType(BintrayConfigExtension.class) def bintrayConfig = project.rootProject.extensions.findByType(BintrayConfigExtension.class)
if((bintrayConfig != null) && (bintrayConfig.publications)) { if((bintrayConfig != null) && (bintrayConfig.publications) && (bintrayConfig.publications.findAll { it == project.name }.size() > 0)) {
def publications = bintrayConfig.publications.findAll { it == project.name } applyPublishing(bintrayConfig)
if(publications.size > 0) { }
}
void applyPublishing(BintrayConfigExtension bintrayConfig) {
project.afterEvaluate {
project.logger.info("Configuring bintray for ${project.name}") project.logger.info("Configuring bintray for ${project.name}")
project.configure(project) { project.configure(project) {
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
} }
def bintray = project.extensions.findByName("bintray") def bintray = project.extensions.findByName("bintray")
@ -47,7 +55,6 @@ class PublishTasks implements Plugin<Project> {
} }
} }
} }
}
// Maven central requires all of the below fields for this to be a valid POM // Maven central requires all of the below fields for this to be a valid POM
void extendPomForMavenCentral(MavenPom pom, BintrayConfigExtension config) { void extendPomForMavenCentral(MavenPom pom, BintrayConfigExtension config) {

View File

@ -5,6 +5,8 @@ apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
description 'Corda node modules'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -160,63 +162,3 @@ task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath classpath = sourceSets.integrationTest.runtimeClasspath
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['node']
dryRun = false
pkg {
repo = 'corda'
name = 'node'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
node(MavenPublication) {
from components.java
artifactId 'node'
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'node'
description 'Corda node modules'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}

View File

@ -7,6 +7,9 @@ apply plugin: 'us.kirchmeier.capsule'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
//name 'corda'
description 'Corda standalone node'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -73,65 +76,3 @@ task buildCertSigningRequestUtilityJAR(type: FatCapsule, dependsOn: project.jar)
artifacts { artifacts {
runtimeArtifacts buildCordaJAR runtimeArtifacts buildCordaJAR
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['corda']
dryRun = false
pkg {
repo = 'corda'
name = 'corda'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
corda(MavenPublication) {
artifactId 'corda'
artifact sourceJar
artifact javadocJar
artifact buildCordaJAR {
classifier ""
}
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'corda'
description 'Corda standalone node'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}

View File

@ -4,6 +4,8 @@ apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' apply plugin: 'com.jfrog.bintray'
description 'Testing utilities for Corda'
repositories { repositories {
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
@ -50,63 +52,3 @@ dependencies {
// OkHTTP: Simple HTTP library. // OkHTTP: Simple HTTP library.
compile 'com.squareup.okhttp3:okhttp:3.3.1' compile 'com.squareup.okhttp3:okhttp:3.3.1'
} }
bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['testutils']
dryRun = false
pkg {
repo = 'corda'
name = 'test-utils'
userOrg = 'r3'
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
}
}
}
}
publishing {
publications {
testutils(MavenPublication) {
from components.java
artifactId 'test-utils'
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'test-utils'
description 'Testing utilities for Corda'
url 'https://github.com/corda/corda'
scm {
url 'https://github.com/corda/corda'
}
licenses {
license {
name 'Apache-2.0'
url 'https://www.apache.org/licenses/LICENSE-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'R3'
name 'R3'
email 'dev@corda.net'
}
}
}
}
}
}
}