Skip to content

Commit cff9297

Browse files
author
James Bassett
committed
Fix publishing (artifactory for snapshots, bintray for releases)
1 parent bb57a4e commit cff9297

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ dependencies {
2424
testCompile 'junit:junit:4.12'
2525
}
2626

27+
tasks.bintrayUpload.dependsOn tasks.check
28+
tasks.artifactoryPublish.dependsOn tasks.check
29+
30+
gradle.taskGraph.whenReady { graph ->
31+
tasks.bintrayUpload.onlyIf {
32+
graph.hasTask(':final') || graph.hasTask(':candidate')
33+
}
34+
tasks.artifactoryPublish.onlyIf {
35+
graph.hasTask(':snapshot') || graph.hasTask(':devSnapshot')
36+
}
37+
}
38+
2739
bintray {
2840
user = System.getenv('BINTRAY_USER')
2941
key = System.getenv('BINTRAY_KEY')

gradle/travisBuild.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
1111
./gradlew build $SWITCHES
1212
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
1313
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
14-
#./gradlew -Prelease.travisci=true snapshot $SWITCHES
15-
./gradlew build $SWITCHES
14+
./gradlew -Prelease.travisci=true snapshot $SWITCHES
1615
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1716
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
1817
case "$TRAVIS_TAG" in

0 commit comments

Comments
 (0)