Skip to content

Commit 3b61b50

Browse files
committed
wip
1 parent 0c40853 commit 3b61b50

2 files changed

Lines changed: 62 additions & 2 deletions

File tree

AndroidAsync/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.koushikdutta.async"
3-
android:versionCode="1"
4-
android:versionName="1.0" >
3+
android:versionCode="100"
4+
android:versionName="1.0.0" >
55

66
<uses-sdk
77
android:minSdkVersion="8"

AndroidAsync/build.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,63 @@ android {
3030
targetSdkVersion 16
3131
}
3232
}
33+
34+
35+
apply plugin: 'maven'
36+
apply plugin: 'signing'
37+
38+
signing {
39+
sign configurations.archives
40+
}
41+
42+
'git remote -v'.execute().getText().find('git@github.com:(.*?)/(.*?).git') {
43+
match ->
44+
user = match[1]
45+
repo = match[2]
46+
}
47+
48+
repoInfo = new groovy.json.JsonSlurper().parseText(new URL('https://api.github.com/repos/' + ext.user + '/' + ext.repo).getText())
49+
50+
group = 'com.koushikdutta.' + repo.toLowerCase()
51+
android_manifest = new XmlParser(false, false).parseText(new File('AndroidManifest.xml').getText())
52+
version = android_manifest.'@android:versionName'
53+
54+
uploadArchives {
55+
repositories {
56+
mavenDeployer {
57+
beforeDeployment { MavenDeployment deployment -> signPom(deployment) }
58+
59+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
60+
authentication(userName: sonatypeUsername, password: sonatypePassword)
61+
}
62+
63+
pom.project {
64+
name repo
65+
packaging 'jar'
66+
description repoInfo.description
67+
url repoInfo.html_url
68+
69+
scm {
70+
url repoInfo.git_url
71+
connection repoInfo.git_url
72+
developerConnection repoInfo.ssh_url
73+
}
74+
75+
licenses {
76+
license {
77+
name 'The Apache Software License, Version 2.0'
78+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
79+
distribution 'repo'
80+
}
81+
}
82+
83+
developers {
84+
developer {
85+
id user
86+
name user
87+
}
88+
}
89+
}
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)