Skip to content

Commit 4939796

Browse files
committed
Uses BINTRAY_{USER,KEY} from env to upload/publish
Those two environment variables are set in the Travis settings. They will not appear in the output log, but can be used on command lines and inside scripts as exported variables.
1 parent 7cf19cf commit 4939796

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Or maybe the upload should always happen, but the publishing
44
# is a separate task?
55
language: java
6-
script: gradle build
6+
script: gradle build -Dpublish=true "-Duser=$BINTRAY_USER" "-Dkey=$BINTRAY_KEY"
77
jdk:
88
- oraclejdk8
99
notifications:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ publishing {
159159
bintray {
160160
user = System.getProperty('bintray.user')
161161
key = System.getProperty('bintray.key')
162+
String publishProperty = System.getProperty('publish')
162163
publications = ['bintrayPublication']
163164

164165
//Whether to run this as dry-run, without deploying
165166
dryRun = false
166167

167168
//Whether version should be auto published after an upload
168-
String publishProperty = System.getProperty('publish')
169169
publish = (publishProperty == "true")
170170
println "Publishing uploaded files: " + publish
171171

0 commit comments

Comments
 (0)