From 52293f54e85db5342cd49dd2d00fe51509b4615e Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 22 Nov 2021 16:56:20 +0100 Subject: [PATCH] ci: Cleanup and finish transition --- build.gradle.kts | 14 ++++++++++++++ buildSrc/build.gradle.kts | 1 - buildSrc/src/main/kotlin/LibsConfig.kt | 12 ------------ buildSrc/src/main/kotlin/PlatformConfig.kt | 12 ------------ 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2a9b28544..d0bc3b838 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,11 @@ import org.ajoberstar.grgit.Grgit import java.time.format.DateTimeFormatter import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED +import java.net.URI + +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" +} logger.lifecycle(""" ******************************************* @@ -66,3 +71,12 @@ allprojects { } applyCommonConfiguration() + +nexusPublishing { + repositories { + sonatype { + nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/")) + snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + } + } +} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 09bfa7632..cf95eca21 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -29,5 +29,4 @@ dependencies { implementation("org.ajoberstar.grgit:grgit-gradle:4.1.0") implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.0") implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.2.0") - implementation("io.github.gradle-nexus:publish-plugin:1.1.0") } diff --git a/buildSrc/src/main/kotlin/LibsConfig.kt b/buildSrc/src/main/kotlin/LibsConfig.kt index bdcadc009..099cb84a2 100644 --- a/buildSrc/src/main/kotlin/LibsConfig.kt +++ b/buildSrc/src/main/kotlin/LibsConfig.kt @@ -1,5 +1,4 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import io.github.gradlenexus.publishplugin.NexusPublishExtension import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.artifacts.ExternalModuleDependency @@ -23,7 +22,6 @@ import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.provideDelegate import org.gradle.kotlin.dsl.register import org.gradle.plugins.signing.SigningExtension -import java.net.URI import javax.inject.Inject fun Project.applyLibrariesConfiguration() { @@ -32,7 +30,6 @@ fun Project.applyLibrariesConfiguration() { apply(plugin = "maven-publish") apply(plugin = "com.github.johnrengelman.shadow") apply(plugin = "signing") - apply(plugin = "io.github.gradle-nexus.publish-plugin") configurations { create("shade") @@ -229,15 +226,6 @@ fun Project.applyLibrariesConfiguration() { } } - configure { - repositories { - sonatype { - nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } - } - } - } // A horrible hack because `softwareComponentFactory` has to be gotten via plugin diff --git a/buildSrc/src/main/kotlin/PlatformConfig.kt b/buildSrc/src/main/kotlin/PlatformConfig.kt index 0d0b09f75..c1fa3a153 100644 --- a/buildSrc/src/main/kotlin/PlatformConfig.kt +++ b/buildSrc/src/main/kotlin/PlatformConfig.kt @@ -13,8 +13,6 @@ import org.gradle.kotlin.dsl.provideDelegate import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.the import org.gradle.plugins.signing.SigningExtension -import io.github.gradlenexus.publishplugin.NexusPublishExtension -import java.net.URI fun Project.applyPlatformAndCoreConfiguration() { applyCommonConfiguration() @@ -24,7 +22,6 @@ fun Project.applyPlatformAndCoreConfiguration() { apply(plugin = "maven-publish") apply(plugin = "com.github.johnrengelman.shadow") apply(plugin = "signing") - apply(plugin = "io.github.gradle-nexus.publish-plugin") applyCommonJavaConfiguration( sourcesJar = name in setOf("worldedit-core", "worldedit-bukkit"), @@ -116,15 +113,6 @@ fun Project.applyPlatformAndCoreConfiguration() { } } - configure { - repositories { - sonatype { - nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } - } - } - if (name != "worldedit-fabric") { configurations["compileClasspath"].apply { resolutionStrategy.componentSelection {