Skip to content

Commit d276be6

Browse files
committed
Not forcing sign, if there is no keyId
1 parent 8a6557a commit d276be6

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ before_install:
3838
# verify files exist in right paths
3939
- find $ANDROID_HOME/build-tools
4040
- file $ANDROID_HOME/build-tools/18.0.1/aapt
41-
- echo "nexusUsername=dummy" >> gradle.properties
42-
- echo "nexusPassword=dummy" >> gradle.properties
4341
- echo "nexusUsername=dummy" >> library/gradle.properties
4442
- echo "nexusPassword=dummy" >> library/gradle.properties
43+

maven_push.gradle

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@ if (isReleaseBuild()) {
1616
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
1717
}
1818

19-
if (!signing.hasProperty('password')) {
19+
if (ext.hasProperty('signing.keyId') && !ext.hasProperty('signing.password')) {
2020
if (System.console())
21-
allprojects {
22-
ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: "))
23-
}
21+
ext.set('signing.password', System.console().readPassword("\n\$ Type in GPG key password: "))
2422
else
25-
allprojects { ext.set('signing.password', 'dummy') }
23+
ext.set('signing.password', 'dummy')
2624
}
2725

28-
if (!project.ext.hasProperty('nexusPassword')) {
26+
if (!ext.hasProperty('nexusPassword')) {
2927
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-
}
28+
project.ext.set('nexusPassword', new String(System.console().readPassword("\n\$ Type in password for Sonatype nexus account ${nexusUsername}: ")))
3329
else
34-
allprojects { project.ext.set('nexusPassword', 'dummy') }
30+
project.ext.set('nexusPassword', 'dummy')
3531
}
3632

3733
afterEvaluate { project ->

0 commit comments

Comments
 (0)