-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpublish-maven.gradle
49 lines (39 loc) · 1.16 KB
/
publish-maven.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//Version 3.0.1
if (project.hasProperty('publicationGradleFileUrl')) {
apply from: publicationGradleFileUrl
} else {
apply from: "$rootDir/publish-aar.gradle"
}
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'de.marcphilipp.nexus-publish'
nexusStaging {
// this package group has to be this one so that all yoti publication there are under the same group
packageGroup = "com.yoti"
username = sonatypeUsername
password = sonatypePassword
delayBetweenRetriesInMillis = 15000
}
import java.time.Duration
nexusPublishing {
repositories {
sonatype()
}
connectTimeout = Duration.ofMinutes(5)
clientTimeout = Duration.ofMinutes(10)
}
project.afterEvaluate {
signing {
def performSigning = !(project.hasProperty('disableSigning') ?
Boolean.valueOf(disableSigning) : false)
if (performSigning) {
required true
if (project.hasProperty("inMemorySigningKey")) {
useInMemoryPgpKeys(inMemorySigningKey, inMemoryKeyPassword)
}
for (pub in publishing.publications) {
sign pub
}
}
}
}