From 08afbccffff6dfcfb23d40dc7b4cf2b856e7a5b3 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Mon, 26 Feb 2024 15:56:43 +0100 Subject: [PATCH] Use Gradle Nexus Publish Plugin --- .../com/bakdata/gradle/SonatypePlugin.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt b/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt index 428a2f2..d3a702d 100644 --- a/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt +++ b/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt @@ -67,6 +67,14 @@ class SonatypePlugin : Plugin { plugins.apply("base") plugins.apply("io.github.gradle-nexus.publish-plugin") + configure { + // create default repository called 'nexus' and set the corresponding default urls + repositories.create("nexus") { + nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/")) + snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + } + } + allprojects { components.matching { it.name == "java" }.configureEach { if (extensions.findByType() == null) { @@ -76,14 +84,6 @@ class SonatypePlugin : Plugin { } } - configure { - // create default repository called 'nexus' and set the corresponding default urls - repositories.create("nexus") { - nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } - } - disallowPublishTasks() } } @@ -102,7 +102,7 @@ class SonatypePlugin : Plugin { packageGroup.set("com.bakdata") repositories["nexus"].apply { - stagingProfileId.set("8412378836ed9c") + stagingProfileId.set("746f6fd1d91a4") username.set(getOverriddenSetting(SonatypeSettings::osshrUsername)) password.set(getOverriddenSetting(SonatypeSettings::osshrPassword)) getOverriddenSetting(SonatypeSettings::nexusUrl)?.let { nexusUrl.set(uri(it)) }