@@ -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
@@ -181,20 +182,6 @@ publishing {
181182 url = ' https://oss.jfrog.org/artifactory/libs-release'
182183 name = ' jfrog'
183184
184- credentials {
185- if (project. rootProject. file(' local.properties' ). exists()) {
186- Properties properties = new Properties ()
187- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
188- username = (properties. containsKey(' bintray.user' )) ? properties. getProperty(' bintray.user' ). toLowerCase() : " BINTRAY_USERNAME"
189- password = properties. getProperty(' bintray.apikey' )
190- }
191- }
192- }
193-
194- maven {
195- url = ' https://api.bintray.com/content/microsoftgraph/Maven/microsoft-graph'
196- name = ' bintray'
197-
198185 credentials {
199186 if (project. rootProject. file(' local.properties' ). exists()) {
200187 Properties properties = new Properties ()
@@ -205,7 +192,28 @@ publishing {
205192 }
206193 }
207194 }
195+ }
208196
197+ bintray {
198+ if (project. rootProject. file(' local.properties' ). exists()) {
199+ Properties properties = new Properties ()
200+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
201+ user = (properties. containsKey(' bintray.user' )) ? properties. getProperty(' bintray.user' ). toLowerCase() : " BINTRAY_USERNAME"
202+ key = properties. getProperty(' bintray.apikey' )
203+ }
204+ publications = [' mavenCentralRelease' ]
205+ pkg {
206+ repo = ' Maven'
207+ name = project. property(' mavenArtifactId' )
208+ userOrg = ' microsoftgraph'
209+ licenses = [' MIT' ]
210+ vcsUrl = ' https://github.com/microsoftgraph/msgraph-sdk-java.git'
211+ publicDownloadNumbers = true
212+ version {
213+ name = " ${ mavenMajorVersion} .${ mavenMinorVersion} .${ mavenPatchVersion} "
214+ vcsTag = " ${ mavenMajorVersion} .${ mavenMinorVersion} .${ mavenPatchVersion} "
215+ }
216+ }
209217}
210218
211219compileJava {
@@ -283,7 +291,7 @@ gradle.taskGraph.whenReady { taskGraph ->
283291
284292model {
285293 tasks. generatePomFileForMavenCentralReleasePublication {
286- destination = file(" $buildDir /generated-pom.xml" )
294+ destination = file(" ${ project. buildDir} /generated-pom.xml" )
287295 }
288296 tasks. publishMavenCentralReleasePublicationToMavenLocal {
289297 dependsOn project. tasks. signArchives
0 commit comments