Skip to content

Commit 808510b

Browse files
committed
Add support for Bintray uploads
1 parent 5795ec9 commit 808510b

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.14.0'
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()
@@ -121,11 +128,11 @@ uploadArchives {
121128
}
122129

123130
pom.project {
124-
name 'Parse-Android'
125-
artifactId = 'parse-android'
131+
name projName
132+
artifactId = artifact
126133
packaging 'jar'
127-
description 'A library that gives you access to the powerful Parse cloud platform from your Android app.'
128-
url 'https://github.com/ParsePlatform/Parse-SDK-Android'
134+
description projDescription
135+
url gitLink
129136

130137
scm {
131138
connection 'scm:[email protected]:ParsePlatform/Parse-SDK-Android.git'
@@ -175,7 +182,7 @@ jacoco {
175182
toolVersion "0.7.1.201405082137"
176183
}
177184

178-
task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
185+
task jacocoTestReport(type: JacocoReport, dependsOn: "testDebugUnitTest") {
179186
group = "Reporting"
180187
description = "Generate Jacoco coverage reports"
181188

@@ -208,3 +215,62 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
208215
coveralls.jacocoReportPath = "${buildDir}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml"
209216

210217
//endregion
218+
219+
// Requires apply plugin: 'com.jfrog.bintray'
220+
221+
bintray {
222+
user = System.getenv('BINTRAY_USER')
223+
key = System.getenv('BINTRAY_API_KEY')
224+
pkg {
225+
repo = 'maven'
226+
name = 'Parse-Android'
227+
userOrg = 'parse'
228+
licenses = ['BSD License']
229+
vcsUrl = 'https://github.com/ParsePlatform/Parse-SDK-Android'
230+
231+
version {
232+
name = version
233+
desc = projDescription
234+
released = new Date()
235+
vcsTag = version
236+
}
237+
}
238+
}
239+
240+
def pomConfig = {
241+
licenses {
242+
license {
243+
name 'BSD License'
244+
url 'https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/LICENSE'
245+
distribution 'repo'
246+
}
247+
}
248+
249+
developers {
250+
developer {
251+
id 'parse'
252+
name 'Parse'
253+
}
254+
}
255+
}
256+
257+
// Create the publication with the pom configuration:
258+
apply plugin: 'maven-publish'
259+
260+
publishing {
261+
publications {
262+
MyPublication(MavenPublication) {
263+
groupId group
264+
artifactId artifact
265+
version version
266+
pom.withXml {
267+
def root = asNode()
268+
root.appendNode('description', desc)
269+
root.appendNode('name', projName)
270+
root.appendNode('url', gitLink)
271+
root.children().last() + pomConfig
272+
}
273+
}
274+
}
275+
}
276+
// 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.0'
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)