@@ -2,10 +2,17 @@ import com.android.builder.core.BuilderConstants
22
33apply plugin : ' com.android.library'
44apply plugin : ' com.github.kt3k.coveralls'
5+ apply plugin : ' com.jfrog.bintray'
56
67group = ' com.parse'
78version = ' 1.15.2-SNAPSHOT'
89
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/ParsePlatform/Parse-SDK-Android'
15+ }
916buildscript {
1017 repositories {
1118 jcenter()
@@ -129,11 +136,11 @@ uploadArchives {
129136 }
130137
131138 pom. project {
132- name ' Parse-Android '
133- artifactId = ' parse-android '
139+ name projName
140+ artifactId = artifact
134141 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/parse-community/Parse-SDK-Android '
142+ description projDescription
143+ url gitLink
137144
138145 scm {
139146 connection ' scm:git@github.com:parse-community/Parse-SDK-Android.git'
@@ -183,7 +190,7 @@ jacoco {
183190 toolVersion " 0.7.1.201405082137"
184191}
185192
186- task jacocoTestReport (type :JacocoReport , dependsOn : " testDebugUnitTest" ) {
193+ task jacocoTestReport (type : JacocoReport , dependsOn : " testDebugUnitTest" ) {
187194 group = " Reporting"
188195 description = " Generate Jacoco coverage reports"
189196
@@ -216,3 +223,62 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
216223coveralls. jacocoReportPath = " ${ buildDir} /reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
217224
218225// 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+ pkg {
233+ repo = ' maven'
234+ name = ' com.parse:parse-android'
235+ userOrg = ' parse'
236+ licenses = [' BSD License' ]
237+ vcsUrl = ' https://github.com/ParsePlatform/Parse-SDK-Android'
238+
239+ version {
240+ name = version
241+ desc = projDescription
242+ released = new Date ()
243+ vcsTag = version
244+ }
245+ }
246+ }
247+
248+ def pomConfig = {
249+ licenses {
250+ license {
251+ name ' BSD License'
252+ url ' https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/LICENSE'
253+ distribution ' repo'
254+ }
255+ }
256+
257+ developers {
258+ developer {
259+ id ' parse'
260+ name ' Parse'
261+ }
262+ }
263+ }
264+
265+ // Create the publication with the pom configuration:
266+ apply plugin : ' maven-publish'
267+
268+ publishing {
269+ publications {
270+ MyPublication (MavenPublication ) {
271+ groupId group
272+ artifactId artifact
273+ version version
274+ pom. withXml {
275+ def root = asNode()
276+ root. appendNode(' description' , desc)
277+ root. appendNode(' name' , projName)
278+ root. appendNode(' url' , gitLink)
279+ root. children(). last() + pomConfig
280+ }
281+ }
282+ }
283+ }
284+ // End of Bintray plugin
0 commit comments