File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,19 @@ allprojects {
2626 }
2727}
2828
29+ subprojects { project ->
30+ afterEvaluate {
31+ if (System . getenv(" ORG_GRADLE_PROJECT_signingKeyId" ) != null ) {
32+ System . out. println (" Getting signing info from protected source." )
33+ project. ext. ' signing.keyId' = System . getenv(" ORG_GRADLE_PROJECT_signingKeyId" )
34+ project. ext. ' signing.password' = System . getenv(' ORG_GRADLE_PROJECT_signingPassword' )
35+ project. ext. ' signing.inMemoryKey' = System . getenv(' ORG_GRADLE_PROJECT_signingInMemoryKey' )
36+ project. ext. SONATYPE_NEXUS_USERNAME = System . getenv(' ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME' )
37+ project. ext. SONATYPE_NEXUS_PASSWORD = System . getenv(' ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD' )
38+ }
39+ }
40+ }
41+
2942task clean (type : Delete ) {
3043 delete rootProject. buildDir
3144}
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ afterEvaluate { project ->
105105
106106 signing {
107107 required { isReleaseBuild() && gradle. taskGraph. hasTask(" uploadArchives" ) }
108+ if (project. hasProperty(' signing.inMemoryKey' )) {
109+ def signingKey = findProperty(" signing.inMemoryKey" ). replace(" \\ n" ," \n " )
110+ def signingPassword = findProperty(" signing.password" )
111+ useInMemoryPgpKeys(signingKey, signingPassword)
112+ }
108113 sign configurations. archives
109114 }
110115
You can’t perform that action at this time.
0 commit comments