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)) }