-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpromote.gradle
34 lines (30 loc) · 1.14 KB
/
promote.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apply from: rootProject.file('gradle/versioning.gradle')
group GROUP
version getVersionName()
if (!hasProperty("signing.keyId")) {
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
ext["signing.password"] = System.getenv('SIGNING_KEY_PASSWORD')
def pgpKeyContent = System.getenv('SIGNING_PRIVATE_KEY_BASE64')
if (pgpKeyContent != null) {
def tmpDir = new File("$rootProject.rootDir/tmp")
mkdir tmpDir
def keyFile = new File("$tmpDir/key.pgp")
keyFile.createNewFile()
def os = keyFile.newDataOutputStream()
os.write(pgpKeyContent.decodeBase64())
os.close()
ext['signing.secretKeyRingFile'] = keyFile.absolutePath
}
}
nexusPublishing {
repositories {
/*
nexus publish plugin by default looking for the following as credential:
* sonatypeUsername and sonatypePassword in global gradle property or
* ORG_GRADLE_PROJECT_sonatypeUsername and ORG_GRADLE_PROJECT_sonatypePassword
in system environments
be sure to set the variable names exactly as above.
*/
sonatype()
}
}