Skip to content

Commit 667be08

Browse files
committed
misc: make nexus urls configurable
1 parent d6f5495 commit 667be08

File tree

1 file changed

+6
-3
lines changed
  • build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/dsl

1 file changed

+6
-3
lines changed

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/dsl/Publish.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ fun Project.configurePublishing(repoName: String, githubOrganization: String = "
138138
/**
139139
* Configure nexus publishing plugin. This (conditionally) enables the `gradle-nexus.publish-plugin` and configures it.
140140
*/
141-
fun Project.configureNexus() {
141+
fun Project.configureNexus(
142+
nexusUrl: String = "https://ossrh-staging-api.central.sonatype.com/service/local/",
143+
snapshotRepositoryUrl: String = "https://central.sonatype.com/repository/maven-snapshots/",
144+
) {
142145
verifyRootProject { "Kotlin SDK nexus configuration must be applied to the root project only" }
143146

144147
val requiredProps = listOf(SONATYPE_USERNAME_PROP, SONATYPE_PASSWORD_PROP, PUBLISH_GROUP_NAME_PROP)
@@ -155,8 +158,8 @@ fun Project.configureNexus() {
155158
packageGroup.set(publishGroupName)
156159
repositories {
157160
create("awsNexus") {
158-
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
159-
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
161+
this.nexusUrl.set(uri(nexusUrl))
162+
this.snapshotRepositoryUrl.set(uri(snapshotRepositoryUrl))
160163
username.set(project.property(SONATYPE_USERNAME_PROP) as String)
161164
password.set(project.property(SONATYPE_PASSWORD_PROP) as String)
162165
}

0 commit comments

Comments
 (0)