diff --git a/ethereumj-core/README.md b/ethereumj-core/README.md index 719f3b76..eedfca66 100644 --- a/ethereumj-core/README.md +++ b/ethereumj-core/README.md @@ -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. diff --git a/ethereumj-core/build.gradle b/ethereumj-core/build.gradle index 7475de73..6d979686 100644 --- a/ethereumj-core/build.gradle +++ b/ethereumj-core/build.gradle @@ -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)