Remove Bintray upload support for now

There is a known issue with Gradle's new `maven-publish` plugin that
causes all dependencies in the published pom to runtime-scoped [1]. This
causes conflicts with our use of Spring's `propdeps` Gradle plugin that
introduces optional and provided scopes.

This commit drops down to using Gradle's older, orginal `maven` plugin,
and JFrog's old-style `artifactory-publish` plugin in order to preserve
propdeps support.

This means removing JFrog's `bintray` plugin, as it appears to depend on
the `maven-publish` plugin. For the moment, ethereumj only really needs
to publish snapshots, and this is still supported. This is a stopgap
measure; it will be necessary to deal with getting uploads to
Bintray/JCenter working again once we're ready for a non-snapshot
release, but this can be dealt with later.

[1]: http://forums.gradle.org/gradle/topics/maven_publish_plugin_generated_pom_making_dependency_scope_runtime
This commit is contained in:
Chris Beams 2015-01-06 11:50:03 +01:00
parent 04ba6c4ed7
commit 00aba13a3d
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
2 changed files with 9 additions and 42 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, while releases will be published to Bintray (and subsequently to JCenter). **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. **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

@ -1,25 +1,24 @@
buildscript {
repositories {
maven { url 'http://repo.spring.io/plugins-release' }
jcenter()
maven { url 'http://repo.spring.io/plugins-release-local' }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
}
}
plugins {
id 'application'
id 'jacoco'
id 'maven'
id 'maven-publish'
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.artifactory' version '3.0.1'
id 'com.jfrog.bintray' version '1.0'
}
apply plugin: 'propdeps-maven'
apply plugin: 'com.jfrog.artifactory-upload'
sourceCompatibility = 1.7
@ -115,16 +114,6 @@ jacocoTestReport {
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
def bintrayUsername = project.hasProperty('bintrayUser') ? project.bintrayUser : ''
def bintrayPassword = project.hasProperty('bintrayKey') ? project.bintrayKey : ''
def pullRequest = System.getenv('TRAVIS_PULL_REQUEST')
@ -137,9 +126,6 @@ artifactory {
username = bintrayUsername
password = bintrayPassword
}
defaults {
publications ('mavenJava')
}
}
resolve {
repository {
@ -153,36 +139,17 @@ artifactoryPublish.onlyIf {
(!pullRequest || pullRequest == 'false') && project.version.endsWith('-SNAPSHOT')
}
bintray {
user = bintrayUsername
key = bintrayPassword
publications = ['mavenJava']
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)
}
}
publish {
description = "Releases snapshots to oss.jfrog.org and releases to Bintray/JCenter"
dependsOn artifactoryPublish, bintrayUpload
task publish {
description = "Publishes snapshots to oss.jfrog.org"
dependsOn artifactoryPublish
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// eliminate test-scoped dependencies (no need in maven central poms)