Publishing to jcenter possible via bintrayUpload (with the correct credentials) and corda now has a dependency on the published gradle plugin to allow the split.

This commit is contained in:
Clinton Alexander 2016-11-16 18:09:23 +00:00
parent 8e342e81d3
commit 14ca7847d0
6 changed files with 28 additions and 5 deletions

View File

@ -21,6 +21,7 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'net.corda.plugins:publish-utils:0.5'
// Can run 'gradle dependencyUpdates' to find new versions of things.
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'

View File

@ -1,7 +1,6 @@
apply plugin: 'kotlin'
apply plugin: QuasarPlugin
// Applying the maven plugin means this will get installed locally when running "gradle install"
apply plugin: DefaultPublishTasks
apply plugin: 'net.corda.plugins.publish-utils'
buildscript {
repositories {

View File

@ -40,4 +40,4 @@ publishing {
artifact javadocJar
}
}
}
}

View File

@ -26,6 +26,7 @@ bintray {
user = System.getenv('CORDA_BINTRAY_USER')
key = System.getenv('CORDA_BINTRAY_KEY')
publications = ['publishUtils']
dryRun = false
pkg {
repo = 'corda'
name = 'publish-utils'
@ -34,6 +35,8 @@ bintray {
}
}
task(install, dependsOn: 'publishToMavenLocal')
publishing {
publications {
publishUtils(MavenPublication) {
@ -43,6 +46,26 @@ publishing {
artifact sourceJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'publish-utils'
description 'A small gradle plugin that adds a couple of convenience functions for publishing to Maven'
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'
}
}
}
}
}
}
}

View File

@ -8,7 +8,7 @@ import org.gradle.api.Project
/**
* A utility plugin that when applied will automatically create source and javadoc publishing tasks
*/
class DefaultPublishTasks implements Plugin<Project> {
class PublishTasks implements Plugin<Project> {
void apply(Project project) {
project.task("sourceJar", type: Jar, dependsOn: project.classes) {
classifier = 'sources'

View File

@ -1 +1 @@
implementation-class=net.corda.plugins.DefaultPublishTasks
implementation-class=net.corda.plugins.PublishTasks