mirror of
https://github.com/corda/corda.git
synced 2024-12-30 09:48:59 +00:00
102 lines
2.5 KiB
Groovy
102 lines
2.5 KiB
Groovy
apply plugin: 'groovy'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
|
|
// Used for bootstrapping project
|
|
buildscript {
|
|
ext.gradle_plugins_version = "0.6.2" // Our version: bump this on release.
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
|
|
}
|
|
}
|
|
|
|
version "$gradle_plugins_version"
|
|
|
|
dependencies {
|
|
compile gradleApi()
|
|
compile localGroovy()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
task("sourceJar", type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task("javadocJar", type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
bintray {
|
|
user = System.getenv('CORDA_BINTRAY_USER')
|
|
key = System.getenv('CORDA_BINTRAY_KEY')
|
|
publications = ['publishUtils']
|
|
dryRun = false
|
|
pkg {
|
|
repo = 'corda'
|
|
name = 'publish-utils'
|
|
userOrg = 'r3'
|
|
licenses = ['Apache-2.0']
|
|
|
|
version {
|
|
gpg {
|
|
sign = true
|
|
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
publishUtils(MavenPublication) {
|
|
from components.java
|
|
groupId 'net.corda.plugins'
|
|
artifactId 'publish-utils'
|
|
|
|
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'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id 'R3'
|
|
name 'R3'
|
|
email 'dev@corda.net'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Aliasing the publishToMavenLocal for simplicity.
|
|
task(install, dependsOn: 'publishToMavenLocal')
|