diff --git a/gradle.properties b/gradle.properties index 2ea2d4a6a..0de12ce95 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ VERSION_NAME=1.4.4-SNAPSHOT -VERSION_CODE=2 +VERSION_CODE=144 GROUP=com.loopj.android POM_DESCRIPTION=An Asynchronous HTTP Library for Android @@ -9,4 +9,4 @@ POM_SCM_CONNECTION=scm:git@github.com:loopj/android-async-http.git POM_SCM_DEV_CONNECTION=scm:git@github.com:loopj/android-async-http.git POM_LICENCE_NAME=The Apache Software License, Version 2.0 POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo \ No newline at end of file +POM_LICENCE_DIST=repo diff --git a/maven_push.gradle b/maven_push.gradle index b45f1153e..cf9d0a612 100644 --- a/maven_push.gradle +++ b/maven_push.gradle @@ -1,6 +1,12 @@ apply plugin: 'maven' apply plugin: 'signing' +configurations { + archives { + extendsFrom configurations.default + } +} + def sonatypeRepositoryUrl if (isReleaseBuild()) { println 'RELEASE BUILD' @@ -10,6 +16,24 @@ if (isReleaseBuild()) { sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/" } +if (!signing.hasProperty('password')) { + if (System.console()) + allprojects { + ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: ")) + } + else + allprojects { ext.set('signing.password', 'dummy') } +} + +if (!project.ext.hasProperty('nexusPassword')) { + if (System.console()) + allprojects { + project.ext.set('nexusPassword', new String(System.console().readPassword("\n\$ Type in password for Sonatype nexus account ${nexusUsername}: "))) + } + else + allprojects { project.ext.set('nexusPassword', 'dummy') } +} + afterEvaluate { project -> uploadArchives { repositories { @@ -62,25 +86,27 @@ afterEvaluate { project -> sign configurations.archives } + task androidReleaseJar(type: Jar) { + from "$buildDir/classes/release/" + } + task androidJavadocs(type: Javadoc) { source = android.sourceSets.main.allJava } task androidJavadocsJar(type: Jar) { classifier = 'javadoc' - //basename = artifact_id from androidJavadocs.destinationDir } task androidSourcesJar(type: Jar) { classifier = 'sources' - //basename = artifact_id from android.sourceSets.main.allSource } artifacts { - //archives packageReleaseJar + archives androidReleaseJar archives androidSourcesJar archives androidJavadocsJar } -} \ No newline at end of file +}