Skip to content

Commit 191f5b4

Browse files
authored
Deploy to Bintray using Travis CI (#6)
* Changed gradle to upload to bintray and to build via travis * Remove deploy from travis script
1 parent 1ba1251 commit 191f5b4

3 files changed

Lines changed: 38 additions & 11 deletions

File tree

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,3 @@ cache:
77
directories:
88
- "$HOME/.m2"
99
- "$HOME/.gradle"
10-
deploy:
11-
provider: bintray
12-
file: bintray.json
13-
user: $BINTRAY_USER
14-
key: $BINTRAY_API_KEY
15-
dry-run: false

build.gradle

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
buildscript { repositories { jcenter() } }
12
plugins {
23
id 'java'
34
id 'org.jetbrains.kotlin.jvm' version '1.2.51'
5+
id "com.jfrog.bintray" version "1.8.4"
46
}
57

8+
apply plugin: "maven-publish"
9+
10+
611
group 'com.github.dsrees'
712
version '0.1.0'
813

@@ -28,4 +33,32 @@ compileKotlin {
2833
}
2934
compileTestKotlin {
3035
kotlinOptions.jvmTarget = "1.8"
31-
}
36+
}
37+
38+
publishing {
39+
publications {
40+
JavaPhoenixClientJar(MavenPublication) {
41+
from components.java
42+
groupId 'com.github.dsrees'
43+
artifactId 'JavaPhoenixClient'
44+
version project.version
45+
}
46+
}
47+
}
48+
49+
bintray {
50+
user = System.getenv('BINTRAY_USER')
51+
key = System.getenv('BINTRAY_API_KEY')
52+
53+
pkg {
54+
repo = 'java-phoenix-client'
55+
name = 'JavaPhoenixClient'
56+
userOrg = user
57+
websiteUrl = 'https://github.com/dsrees/JavaPhoenixClient'
58+
issueTrackerUrl = 'https://github.com/dsrees/JavaPhoenixClient/issues'
59+
vcsUrl = 'https://github.com/dsrees/JavaPhoenixClient.git'
60+
licenses = ['MIT']
61+
}
62+
publications = ['JavaPhoenixClientJar']
63+
}
64+

gradle/travis_build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
55
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6-
./gradlew -Prelease.useLastTag=true build
6+
./gradlew build
77
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
88
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
9-
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot --stacktrace
9+
./gradlew build
1010
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1111
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
12-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
12+
./gradlew bintrayUpload --stacktrace
1313
else
1414
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
15-
./gradlew -Prelease.useLastTag=true build
15+
./gradlew build
1616
fi

0 commit comments

Comments
 (0)