Skip to content

Commit db50ffd

Browse files
authored
Merge pull request #76 from palantir/bkeyes/bintray-upload
Use Bintray plugin for publishing
2 parents f54f6cf + 515c11b commit db50ffd

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id "com.palantir.git-version" version "0.11.0"
33
id "com.palantir.jacoco-coverage" version "0.4.0" apply false
44
id "com.github.hierynomus.license" version "0.13.1" apply false
5+
id "com.jfrog.bintray" version "1.8.4" apply false
56
}
67

78
apply from: 'gradle/versions.gradle'

gradle/shared.gradle

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ apply plugin: 'checkstyle'
55
apply plugin: 'maven-publish'
66
apply plugin: 'com.palantir.jacoco-coverage'
77
apply plugin: 'com.github.hierynomus.license'
8+
apply plugin: 'com.jfrog.bintray'
89

910
apply from: rootProject.file('gradle/versions.gradle')
1011
apply from: rootProject.file('gradle/circle.gradle')
@@ -83,18 +84,28 @@ publishing {
8384
name "local"
8485
url localPublishDir
8586
}
86-
87-
maven {
88-
name "bintray"
89-
url "https://api.bintray.com/maven/palantir/releases/giraffe/;publish=1"
90-
credentials {
91-
username System.env.BINTRAY_USERNAME
92-
password System.env.BINTRAY_PASSWORD
93-
}
94-
}
9587
}
9688
}
9789

90+
bintray {
91+
user = System.env.BINTRAY_USERNAME
92+
key = System.env.BINTRAY_PASSWORD
93+
publish = true
94+
pkg {
95+
repo = 'releases'
96+
name = 'giraffe'
97+
userOrg = 'palantir'
98+
licenses = ['Apache-2.0']
99+
vcsUrl = 'https://github.com/palantir/giraffe.git'
100+
publications = ['java']
101+
}
102+
}
103+
104+
publish.dependsOn bintrayUpload
105+
bintrayUpload.onlyIf {
106+
versionDetails().isCleanTag && System.env.BINTRAY_USERNAME && System.env.BINTRAY_PASSWORD
107+
}
108+
98109
task resolveDependencies {
99110
description = 'Forces the resolution of all dependencies in all configurations.'
100111
group = 'build'

0 commit comments

Comments
 (0)