Skip to content

Commit

Permalink
Not forcing sign, if there is no keyId
Browse files Browse the repository at this point in the history
  • Loading branch information
smarek committed Oct 12, 2013
1 parent 8a6557a commit d276be6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

16 changes: 6 additions & 10 deletions maven_push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit d276be6

Please sign in to comment.