@@ -2,10 +2,17 @@ import com.android.builder.core.BuilderConstants
2
2
3
3
apply plugin : ' com.android.library'
4
4
apply plugin : ' com.github.kt3k.coveralls'
5
+ apply plugin : ' com.jfrog.bintray'
5
6
6
7
group = ' com.parse'
7
- version = ' 1.15.0 '
8
+ version = ' 1.15.6-SNAPSHOT '
8
9
10
+ ext {
11
+ projDescription = ' A library that gives you access to the powerful Parse cloud platform from your Android app.'
12
+ artifact = ' parse-android'
13
+ projName = ' Parse-Android'
14
+ gitLink = ' https://github.com/parse-community/Parse-SDK-Android'
15
+ }
9
16
buildscript {
10
17
repositories {
11
18
jcenter()
@@ -129,22 +136,22 @@ uploadArchives {
129
136
}
130
137
131
138
pom. project {
132
- name ' Parse-Android '
133
- artifactId = ' parse-android '
139
+ name projName
140
+ artifactId = artifact
134
141
packaging ' aar'
135
- description ' A library that gives you access to the powerful Parse cloud platform from your Android app. '
136
- url ' https://github.com/ParsePlatform/Parse-SDK-Android '
142
+ description projDescription
143
+ url gitLink
137
144
138
145
scm {
139
- connection
' scm:[email protected] :ParsePlatform /Parse-SDK-Android.git'
140
- developerConnection
' scm:[email protected] :ParsePlatform /Parse-SDK-Android.git'
141
- url ' https://github.com/ParsePlatform /Parse-SDK-Android'
146
+ connection
' scm:[email protected] :parse-community /Parse-SDK-Android.git'
147
+ developerConnection
' scm:[email protected] :parse-community /Parse-SDK-Android.git'
148
+ url ' https://github.com/parse-community /Parse-SDK-Android'
142
149
}
143
150
144
151
licenses {
145
152
license {
146
153
name ' BSD License'
147
- url ' https://github.com/ParsePlatform /Parse-SDK-Android/blob/master/LICENSE'
154
+ url ' https://github.com/parse-community /Parse-SDK-Android/blob/master/LICENSE'
148
155
distribution ' repo'
149
156
}
150
157
}
@@ -183,7 +190,7 @@ jacoco {
183
190
toolVersion " 0.7.1.201405082137"
184
191
}
185
192
186
- task jacocoTestReport (type :JacocoReport , dependsOn : " testDebugUnitTest" ) {
193
+ task jacocoTestReport (type : JacocoReport , dependsOn : " testDebugUnitTest" ) {
187
194
group = " Reporting"
188
195
description = " Generate Jacoco coverage reports"
189
196
@@ -216,3 +223,92 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
216
223
coveralls. jacocoReportPath = " ${ buildDir} /reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
217
224
218
225
// endregion
226
+
227
+ // Requires apply plugin: 'com.jfrog.bintray'
228
+
229
+ bintray {
230
+ user = System . getenv(' BINTRAY_USER' )
231
+ key = System . getenv(' BINTRAY_API_KEY' )
232
+
233
+ publications = [" MyPublication" ]
234
+
235
+ publish = true
236
+ pkg {
237
+ repo = ' maven'
238
+ name = ' com.parse:parse-android'
239
+ userOrg = ' parse'
240
+ licenses = [' BSD License' ]
241
+ vcsUrl = ' https://github.com/parse-community/Parse-SDK-Android'
242
+ version {
243
+ name = project. version
244
+ desc = projDescription
245
+ released = new Date ()
246
+ vcsTag = project. version
247
+
248
+ // Sonatype username/passwrod must be set for this operation to happen
249
+ mavenCentralSync {
250
+ sync = true
251
+ user = ossrhUsername
252
+ password = ossrhPassword
253
+ close = ' 1' // release automatically
254
+ }
255
+ }
256
+ }
257
+ }
258
+
259
+ def pomConfig = {
260
+ licenses {
261
+ license {
262
+ name ' BSD License'
263
+ url ' https://github.com/parse-community/Parse-SDK-Android/blob/master/LICENSE'
264
+ distribution ' repo'
265
+ }
266
+ }
267
+
268
+ scm {
269
+ url gitLink
270
+ }
271
+
272
+ developers {
273
+ developer {
274
+ id ' parse'
275
+ name ' Parse'
276
+ }
277
+ }
278
+ }
279
+
280
+ // Create the publication with the pom configuration:
281
+ apply plugin : ' maven-publish'
282
+
283
+ publishing {
284
+ publications {
285
+ MyPublication (MavenPublication ) {
286
+ groupId group
287
+ // We have to specify it here because otherwise Bintray's plugin will assume the artifact's name is Parse
288
+ artifactId artifact
289
+ artifacts = [androidSourcesJar, bundleRelease]
290
+ version version
291
+ pom. withXml {
292
+ def root = asNode()
293
+ root. appendNode(' description' , projDescription)
294
+ root. appendNode(' name' , projName)
295
+ root. appendNode(' url' , gitLink)
296
+ root. children(). last() + pomConfig
297
+
298
+ // maven-publish workaround to include dependencies
299
+ def dependenciesNode = asNode(). appendNode(' dependencies' )
300
+
301
+ // Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
302
+ configurations. compile. allDependencies. each {
303
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
304
+ dependencyNode. appendNode(' groupId' , it. group)
305
+ dependencyNode. appendNode(' artifactId' , it. name)
306
+ dependencyNode. appendNode(' version' , it. version)
307
+ }
308
+
309
+ }
310
+ }
311
+ }
312
+ }
313
+
314
+ // End of Bintray plugin
0 commit comments