Skip to content

Commit 98b0ed7

Browse files
authored
Merge pull request #147 from microsoftgraph/bintray-snapshot-upload
Bintray snapshot uploader task
2 parents 3c65404 + 3f7b1ca commit 98b0ed7

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

build.gradle

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ def pomConfig = {
4747
}
4848
}
4949

50+
//Publishing tasks-
51+
//Maven Central Snapshot: publishSnapshotPublicationToMavenRepository
52+
//Maven Central Release: publishMavenCentralReleasePublicationToMaven2Repository
53+
//Bintray Snapshot: publishSnapshotPublicationToMaven3Repository
54+
//Bintray Release: uploadArchives
55+
5056
publishing {
5157

5258
publications {
@@ -72,7 +78,7 @@ publishing {
7278
}
7379

7480
}
75-
mavenCentralSnapshot(MavenPublication) {
81+
Snapshot(MavenPublication) {
7682
customizePom(pom)
7783
groupId 'com.microsoft.graph'
7884
artifactId 'microsoft-graph'
@@ -161,6 +167,24 @@ publishing {
161167
}
162168
}
163169
}
170+
171+
maven {
172+
url = project.property('mavenBintraySnapshotUrl')
173+
174+
credentials {
175+
if (project.rootProject.file('local.properties').exists()) {
176+
177+
Properties properties = new Properties()
178+
179+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
180+
181+
username = properties.getProperty('bintray.user')
182+
183+
password = properties.getProperty('bintray.apikey')
184+
185+
}
186+
}
187+
}
164188
}
165189

166190
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx2g
2323

2424
mavenRepoUrl = https://api.bintray.com/content/microsoftgraph/Maven/microsoft-graph
25+
mavenBintraySnapshotUrl = http://oss.jfrog.org/artifactory/oss-snapshot-local
2526
mavenGroupId = com.microsoft.graph
2627
mavenArtifactId = microsoft-graph
2728
mavenMajorVersion = 1

0 commit comments

Comments
 (0)