diff --git a/build.gradle b/build.gradle index 8c066772a..388cd898f 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ plugins { id 'eclipse' id 'maven-publish' id 'signing' + id 'com.jfrog.bintray' version '1.8.5' } // In this section you declare where to find the dependencies of your project @@ -176,20 +177,6 @@ publishing { url = 'https://oss.jfrog.org/artifactory/libs-release' name = 'jfrog' - credentials { - if (project.rootProject.file('local.properties').exists()) { - Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) - username = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME" - password = properties.getProperty('bintray.apikey') - } - } - } - - maven { - url = 'https://api.bintray.com/content/microsoftgraph/Maven' - name = 'bintray' - credentials { if (project.rootProject.file('local.properties').exists()) { Properties properties = new Properties() @@ -200,7 +187,28 @@ publishing { } } } +} +bintray { + if (project.rootProject.file('local.properties').exists()) { + Properties properties = new Properties() + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + user = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME" + key = properties.getProperty('bintray.apikey') + } + publications = ['maven'] + pkg { + repo = 'Maven' + name = project.property('mavenArtifactId') + userOrg = 'microsoftgraph' + licenses = ['MIT'] + vcsUrl = 'https://github.com/microsoftgraph/msgraph-sdk-java-core.git' + publicDownloadNumbers = true + version { + name = "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}" + vcsTag = "v${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}" + } + } } compileJava {