Skip to content

Commit

Permalink
Added snapshot building via the artifactory plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dlew committed Jul 31, 2015
1 parent 4a5dc7b commit 4121448
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build bintrayUpload --stacktrace
./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build artifactoryPublish --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build bintrayUpload --stacktrace
Expand Down
26 changes: 25 additions & 1 deletion rxandroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ buildscript {
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory-upload'

group = GROUP
version = VERSION_NAME
Expand Down Expand Up @@ -83,7 +85,29 @@ install {
}
}

// Configure gradle-bintray-plugin
// Configure artifactory (for publishing snapshots)
//
// Based on NebulaOJOPublishingPlugin (from nebula-bintray-plugin)
artifactory {
contextUrl = 'https://oss.jfrog.org'

publish {
repository {
repoKey = 'oss-snapshot-local'

if (project.hasProperty('bintrayUser')) {
username = project.property('bintrayUser')
password = project.property('bintrayKey')
}
}

defaults {
publishConfigs('archives')
}
}
}

// Configure gradle-bintray-plugin (for publishing releases)
bintray {
configurations = ['archives']

Expand Down

0 comments on commit 4121448

Please sign in to comment.