Skip to content

Commit

Permalink
Merge pull request #31 from ToxicBakery/issue-30
Browse files Browse the repository at this point in the history
#30 Gave up trying to properly set the signing keys, gradle can go fuck itself and its terrible documentation.
  • Loading branch information
ToxicBakery committed Apr 29, 2015
2 parents f54df9a + 4e4f7a9 commit 9533aba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request? $TRAVIS_PULL_REQUEST"
- echo "Travis tag $TRAVIS_TAG"
- echo -e "signing.keyId=${signing_keyId}" >> "gradle.properties"
- echo -e "signing.password=${signing_password}" >> "gradle.properties"
- echo -e "signing.secretKeyRingFile=../maven.keystore.gpg" >> "gradle.properties"
- gradle clean assemble test uploadArchives --continue

install:
Expand Down
7 changes: 0 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

// Update the signing information with the secure keys stored in Travis
if (System.getenv('signing_keyId') && System.getenv('signing_password')) {
ext."signing.keyId" = System.getenv('signing_keyId')
ext."signing.password" = System.getenv('signing_password')
ext."signing.secretKeyRingFile" = "./maven.keystore.gpg"
}
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions maven_push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@ def getRepositoryPassword() {
return System.getenv('sonatype_pass') ?: hasProperty('sonatype_pass') ? sonatype_pass : ""
}

String getBranchName() {
return System.getenv('TRAVIS_BRANCH')
}

afterEvaluate { project ->

println "Is Tag ${isTag()}"
println "Branch ${getBranchName()}"
println "Is Release ${isReleaseBuild()}"
println "Is Travis ${isTravis()}"
println "Has Username ${!getRepositoryUsername().empty}"
println "Has Password ${!getRepositoryPassword().empty}"
println "Determined Version ${version}"

uploadArchives {
repositories {
mavenDeployer {
Expand Down

0 comments on commit 9533aba

Please sign in to comment.