forked from pCloud/pcloud-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnexus-publish.gradle
More file actions
32 lines (26 loc) · 1.11 KB
/
nexus-publish.gradle
File metadata and controls
32 lines (26 loc) · 1.11 KB
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
apply from: rootProject.file('publishing.gradle')
group = getPublishProperty('groupId')
def ossrhUsername, ossrhPassword, sonatypeStagingProfileId = ''
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
Properties properties = new Properties()
properties.load(secretPropsFile.newDataInputStream())
ossrhUsername = properties.getProperty("ossrhUsername")
ossrhPassword = properties.getProperty("ossrhPassword")
sonatypeStagingProfileId = properties.getProperty("sonatypeStagingProfileId")
} else {
ossrhUsername = System.getenv('OSSRH_USERNAME')
ossrhPassword = System.getenv('OSSRH_PASSWORD')
sonatypeStagingProfileId = System.getenv('SONATYPE_STAGING_PROFILE_ID')
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = ossrhUsername
password = ossrhPassword
stagingProfileId = sonatypeStagingProfileId
}
}
}