-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpublish-root.gradle
More file actions
28 lines (26 loc) · 926 Bytes
/
publish-root.gradle
File metadata and controls
28 lines (26 loc) · 926 Bytes
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
// Create variables with empty default values
ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.key"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
ext["sonatypeStagingProfileId"] = ''
Properties p = new Properties()
def localPropertiesFile = file("local.properties")
// Read local.properties file if it exists
if (localPropertiesFile.exists()) {
p.load(localPropertiesFile.newInputStream())
}
p.each { name, value -> ext[name] = value }
// Set up Sonatype repository
nexusPublishing {
repositories {
sonatype {
stagingProfileId = sonatypeStagingProfileId
username = ossrhUsername
password = ossrhPassword
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/"))
}
}
}