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()
@ -73,64 +75,4 @@ dependencies {
task integrationTest(type: Test) { 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()
@ -90,64 +90,4 @@ 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()
@ -30,64 +32,4 @@ sourceSets {
srcDir "../config/test" srcDir "../config/test"
} }
} }
} }
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,27 +24,34 @@ 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) { }
project.logger.info("Configuring bintray for ${project.name}") }
project.configure(project) {
apply plugin: 'com.jfrog.bintray'
}
def bintray = project.extensions.findByName("bintray")
configureBintray(bintray, bintrayConfig)
project.publishing.publications.create(project.name, MavenPublication) {
from project.components.java
groupId project.group
artifactId project.name
artifact project.tasks.sourceJar void applyPublishing(BintrayConfigExtension bintrayConfig) {
artifact project.tasks.javadocJar project.afterEvaluate {
project.logger.info("Configuring bintray for ${project.name}")
project.configure(project) {
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
}
def bintray = project.extensions.findByName("bintray")
configureBintray(bintray, bintrayConfig)
project.publishing.publications.create(project.name, MavenPublication) {
from project.components.java
groupId project.group
artifactId project.name
extendPomForMavenCentral(pom, bintrayConfig) artifact project.tasks.sourceJar
} artifact project.tasks.javadocJar
extendPomForMavenCentral(pom, bintrayConfig)
} }
} }
} }

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()
@ -159,64 +161,4 @@ dependencies {
task integrationTest(type: Test) { 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()
@ -72,66 +75,4 @@ 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()
@ -49,64 +51,4 @@ 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'
}
}
}
}
}
}
}