Skip to content

Commit 8a6557a

Browse files
committed
New Gradle configuration files
1 parent 1929771 commit 8a6557a

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION_NAME=1.4.4-SNAPSHOT
2-
VERSION_CODE=2
2+
VERSION_CODE=144
33
GROUP=com.loopj.android
44

55
POM_DESCRIPTION=An Asynchronous HTTP Library for Android
@@ -9,4 +9,4 @@ POM_SCM_CONNECTION=scm:git@github.com:loopj/android-async-http.git
99
POM_SCM_DEV_CONNECTION=scm:git@github.com:loopj/android-async-http.git
1010
POM_LICENCE_NAME=The Apache Software License, Version 2.0
1111
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
12-
POM_LICENCE_DIST=repo
12+
POM_LICENCE_DIST=repo

maven_push.gradle

+30-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
apply plugin: 'maven'
22
apply plugin: 'signing'
33

4+
configurations {
5+
archives {
6+
extendsFrom configurations.default
7+
}
8+
}
9+
410
def sonatypeRepositoryUrl
511
if (isReleaseBuild()) {
612
println 'RELEASE BUILD'
@@ -10,6 +16,24 @@ if (isReleaseBuild()) {
1016
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
1117
}
1218

19+
if (!signing.hasProperty('password')) {
20+
if (System.console())
21+
allprojects {
22+
ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: "))
23+
}
24+
else
25+
allprojects { ext.set('signing.password', 'dummy') }
26+
}
27+
28+
if (!project.ext.hasProperty('nexusPassword')) {
29+
if (System.console())
30+
allprojects {
31+
project.ext.set('nexusPassword', new String(System.console().readPassword("\n\$ Type in password for Sonatype nexus account ${nexusUsername}: ")))
32+
}
33+
else
34+
allprojects { project.ext.set('nexusPassword', 'dummy') }
35+
}
36+
1337
afterEvaluate { project ->
1438
uploadArchives {
1539
repositories {
@@ -62,25 +86,27 @@ afterEvaluate { project ->
6286
sign configurations.archives
6387
}
6488

89+
task androidReleaseJar(type: Jar) {
90+
from "$buildDir/classes/release/"
91+
}
92+
6593
task androidJavadocs(type: Javadoc) {
6694
source = android.sourceSets.main.allJava
6795
}
6896

6997
task androidJavadocsJar(type: Jar) {
7098
classifier = 'javadoc'
71-
//basename = artifact_id
7299
from androidJavadocs.destinationDir
73100
}
74101

75102
task androidSourcesJar(type: Jar) {
76103
classifier = 'sources'
77-
//basename = artifact_id
78104
from android.sourceSets.main.allSource
79105
}
80106

81107
artifacts {
82-
//archives packageReleaseJar
108+
archives androidReleaseJar
83109
archives androidSourcesJar
84110
archives androidJavadocsJar
85111
}
86-
}
112+
}

0 commit comments

Comments
 (0)