Skip to content

Commit 5680162

Browse files
committed
Add support for Bintray uploads
1 parent 2e15813 commit 5680162

File tree

2 files changed

+76
-7
lines changed

2 files changed

+76
-7
lines changed

Parse/build.gradle

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ import com.android.builder.core.BuilderConstants
22

33
apply plugin: 'com.android.library'
44
apply plugin: 'com.github.kt3k.coveralls'
5+
apply plugin: 'com.jfrog.bintray'
56

67
group = 'com.parse'
78
version = '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+
}
916
buildscript {
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") {
216223
coveralls.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

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
apply plugin: 'com.github.ben-manes.versions'
32
buildscript {
43
repositories {
54
jcenter()
65
}
76
dependencies {
87
classpath 'com.android.tools.build:gradle:2.3.1'
9-
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
108
}
119
}
1210

11+
plugins {
12+
id "com.jfrog.bintray" version "1.7.3"
13+
id 'com.github.ben-manes.versions' version '0.14.0'
14+
}
15+
1316
allprojects {
1417
repositories {
1518
jcenter()

0 commit comments

Comments
 (0)