Permalink
Browse files

Not forcing sign, if there is no keyId

  • Loading branch information...
1 parent 8a6557a commit d276be61ab1e1595654ae1fadd18b03712bbdc18 @smarek smarek committed Oct 12, 2013
Showing with 7 additions and 12 deletions.
  1. +1 −2 .travis.yml
  2. +6 −10 maven_push.gradle
View
@@ -38,7 +38,6 @@ before_install:
# verify files exist in right paths
- find $ANDROID_HOME/build-tools
- file $ANDROID_HOME/build-tools/18.0.1/aapt
- - echo "nexusUsername=dummy" >> gradle.properties
- - echo "nexusPassword=dummy" >> gradle.properties
- echo "nexusUsername=dummy" >> library/gradle.properties
- echo "nexusPassword=dummy" >> library/gradle.properties
+
View
@@ -16,22 +16,18 @@ if (isReleaseBuild()) {
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
}
-if (!signing.hasProperty('password')) {
+if (ext.hasProperty('signing.keyId') && !ext.hasProperty('signing.password')) {
if (System.console())
- allprojects {
- ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: "))
- }
+ ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: "))
else
- allprojects { ext.set('signing.password', 'dummy') }
+ ext.set('signing.password', 'dummy')
}
-if (!project.ext.hasProperty('nexusPassword')) {
+if (!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}: ")))
- }
+ 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') }
+ project.ext.set('nexusPassword', 'dummy')
}
afterEvaluate { project ->

0 comments on commit d276be6

Please sign in to comment.