Re-enable Bintray upload support

Thanks to @jbaruch for his comments at
https://github.com/ethereum/ethereumj/commit/00aba13#commitcomment-9167542
This commit is contained in:
Chris Beams 2015-01-06 14:07:09 +01:00
parent 00aba13a3d
commit 1c354cb736
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
2 changed files with 24 additions and 3 deletions

View File

@ -59,4 +59,4 @@ Run `../gradlew install`.
#### Publish ethereumj-core builds
Simply push to master, and [the Travis CI build](https://travis-ci.org/ethereum/ethereumj) will take care of the rest. To publish manually instead, just run `../gradlew publish`. Where the artifacts are published depends on the value of the `version` property in the [root build.gradle file](../build.gradle). Snapshots (version values ending in `-SNAPSHOT`) will be published to oss.jfrog.org. **You must be a member of the [ethereum Bintray organization](https://bintray.com/ethereum) and you must supply `bintrayUser` and `bintrayKey` properties to the Gradle build in order to authenticate against these repositories**. Configure these properties in your `$HOME/.gradle/gradle.properties` for greatest convenience and security.
Simply push to master, and [the Travis CI build](https://travis-ci.org/ethereum/ethereumj) will take care of the rest. To publish manually instead, just run `../gradlew publish`. Where the artifacts are published depends on the value of the `version` property in the [root build.gradle file](../build.gradle). Snapshots (version values ending in `-SNAPSHOT`) will be published to [oss.jfrog.org](https://oss.jfrog.org/libs-snapshot/org/ethereum/), while releases will be published to [Bintray](https://bintray.com/ethereum/maven/org.ethereum/) (and subsequently to [JCenter](http://jcenter.bintray.com/org/ethereum/)). **You must be a member of the [ethereum Bintray organization](https://bintray.com/ethereum) and you must supply `bintrayUser` and `bintrayKey` properties to the Gradle build in order to authenticate against these repositories**. Configure these properties in your `$HOME/.gradle/gradle.properties` for greatest convenience and security.

View File

@ -15,6 +15,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '1.2.0'
id 'me.champeau.gradle.antlr4' version '0.1'
id 'com.github.kt3k.coveralls' version '2.0.1x'
id 'com.jfrog.bintray' version '1.0'
}
apply plugin: 'propdeps-maven'
@ -139,6 +140,25 @@ artifactoryPublish.onlyIf {
(!pullRequest || pullRequest == 'false') && project.version.endsWith('-SNAPSHOT')
}
bintray {
user = bintrayUsername
key = bintrayPassword
configurations = ['archives']
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
userOrg = 'ethereum' //An optional organization name when the repo belongs to one of the user's orgs
repo = 'maven'
name = 'org.ethereum'
}
}
bintrayUpload.onlyIf {
(!pullRequest || pullRequest == 'false') && !project.version.endsWith('-SNAPSHOT')
}
install {
repositories.mavenInstaller {
customizePom(pom, project)
@ -146,10 +166,11 @@ install {
}
task publish {
description = "Publishes snapshots to oss.jfrog.org"
dependsOn artifactoryPublish
description = "Publishes snapshots to oss.jfrog.org and releases to Bintray/JCenter"
dependsOn artifactoryPublish, bintrayUpload
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// eliminate test-scoped dependencies (no need in maven central poms)