Skip to content

Commit ac94091

Browse files
authored
Merge pull request #61 from microsoftgraph/hotfix/gradle-repos-definitions
- adds custom task for bintray as documented
2 parents 69804f6 + ebdf244 commit ac94091

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

build.gradle

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins {
1313
id 'eclipse'
1414
id 'maven-publish'
1515
id 'signing'
16+
id 'com.jfrog.bintray' version '1.8.5'
1617
}
1718

1819
// In this section you declare where to find the dependencies of your project
@@ -176,20 +177,6 @@ publishing {
176177
url = 'https://oss.jfrog.org/artifactory/libs-release'
177178
name = 'jfrog'
178179

179-
credentials {
180-
if (project.rootProject.file('local.properties').exists()) {
181-
Properties properties = new Properties()
182-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
183-
username = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME"
184-
password = properties.getProperty('bintray.apikey')
185-
}
186-
}
187-
}
188-
189-
maven {
190-
url = 'https://api.bintray.com/content/microsoftgraph/Maven'
191-
name = 'bintray'
192-
193180
credentials {
194181
if (project.rootProject.file('local.properties').exists()) {
195182
Properties properties = new Properties()
@@ -200,7 +187,28 @@ publishing {
200187
}
201188
}
202189
}
190+
}
203191

192+
bintray {
193+
if (project.rootProject.file('local.properties').exists()) {
194+
Properties properties = new Properties()
195+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
196+
user = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME"
197+
key = properties.getProperty('bintray.apikey')
198+
}
199+
publications = ['maven']
200+
pkg {
201+
repo = 'Maven'
202+
name = project.property('mavenArtifactId')
203+
userOrg = 'microsoftgraph'
204+
licenses = ['MIT']
205+
vcsUrl = 'https://github.com/microsoftgraph/msgraph-sdk-java-core.git'
206+
publicDownloadNumbers = true
207+
version {
208+
name = "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}"
209+
vcsTag = "v${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}"
210+
}
211+
}
204212
}
205213

206214
compileJava {

0 commit comments

Comments
 (0)