From 3f7b1ca9e985c7cb2a81f472d78622f84499e8de Mon Sep 17 00:00:00 2001 From: Nakul Sabharwal Date: Fri, 28 Sep 2018 15:42:33 +0530 Subject: [PATCH] Added task to publish to bintray snapshot repo. --- build.gradle | 26 +++++++++++++++++++++++++- gradle.properties | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 276e403d656..81717149419 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,12 @@ def pomConfig = { } } +//Publishing tasks- +//Maven Central Snapshot: publishSnapshotPublicationToMavenRepository +//Maven Central Release: publishMavenCentralReleasePublicationToMaven2Repository +//Bintray Snapshot: publishSnapshotPublicationToMaven3Repository +//Bintray Release: uploadArchives + publishing { publications { @@ -72,7 +78,7 @@ publishing { } } - mavenCentralSnapshot(MavenPublication) { + Snapshot(MavenPublication) { customizePom(pom) groupId 'com.microsoft.graph' artifactId 'microsoft-graph' @@ -161,6 +167,24 @@ publishing { } } } + + maven { + url = project.property('mavenBintraySnapshotUrl') + + credentials { + if (project.rootProject.file('local.properties').exists()) { + + Properties properties = new Properties() + + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + + username = properties.getProperty('bintray.user') + + password = properties.getProperty('bintray.apikey') + + } + } + } } } diff --git a/gradle.properties b/gradle.properties index 1f9de7094e6..14fc60c4b4a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,6 +22,7 @@ org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx2g mavenRepoUrl = https://api.bintray.com/content/microsoftgraph/Maven/microsoft-graph +mavenBintraySnapshotUrl = http://oss.jfrog.org/artifactory/oss-snapshot-local mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph mavenMajorVersion = 1