Skip to content

Commit

Permalink
Publishing to jcenter possible via bintrayUpload (with the correct cr…
Browse files Browse the repository at this point in the history
…edentials) and corda now has a dependency on the published gradle plugin to allow the split.
  • Loading branch information
Clintonio committed Nov 18, 2016
1 parent 8e342e8 commit 14ca784
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion finance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ publishing {
artifact javadocJar
}
}
}
}
23 changes: 23 additions & 0 deletions gradle-plugins/publish-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -34,6 +35,8 @@ bintray {
}
}

task(install, dependsOn: 'publishToMavenLocal')

publishing {
publications {
publishUtils(MavenPublication) {
Expand All @@ -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'
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
implementation-class=net.corda.plugins.DefaultPublishTasks
implementation-class=net.corda.plugins.PublishTasks

0 comments on commit 14ca784

Please sign in to comment.