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 {
26
26
}
27
27
}
28
28
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
+
29
42
task clean (type : Delete ) {
30
43
delete rootProject. buildDir
31
44
}
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ afterEvaluate { project ->
105
105
106
106
signing {
107
107
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
+ }
108
113
sign configurations. archives
109
114
}
110
115
You can’t perform that action at this time.
0 commit comments