-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
30 lines (27 loc) · 1.05 KB
/
build.gradle.kts
File metadata and controls
30 lines (27 loc) · 1.05 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
group = "dev.thriving.oss"
plugins {
alias(libs.plugins.publish)
alias(libs.plugins.release)
}
nexusPublishing {
repositories {
// see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
val ossrhUsername = providers.environmentVariable("OSSRH_USERNAME")
val ossrhPassword = providers.environmentVariable("OSSRH_PASSWORD")
if (ossrhUsername.isPresent && ossrhPassword.isPresent) {
username.set(ossrhUsername.get())
password.set(ossrhPassword.get())
}
}
}
}
// do not generate extra load on Nexus with new staging repository if signing fails
val initializeSonatypeStagingRepository by tasks.existing
subprojects {
initializeSonatypeStagingRepository {
shouldRunAfter(tasks.withType<Sign>())
}
}