From ca49458a4478b4208e2528e112816baa719929d9 Mon Sep 17 00:00:00 2001 From: wizjany Date: Sun, 21 Jul 2024 23:06:56 -0400 Subject: [PATCH] A bit of cleanup. Definitely did not accidentally make a 40MB jar halfway through. --- build-logic/build.gradle.kts | 5 ----- .../kotlin/buildlogic.common-java.gradle.kts | 16 ---------------- .../src/main/kotlin/buildlogic.libs.gradle.kts | 7 ++----- .../main/kotlin/buildlogic.platform.gradle.kts | 2 +- .../kotlin/buildlogic/CommonJavaExtension.kt | 7 ------- build.gradle.kts | 1 - config/checkstyle/import-control.xml | 1 - gradle/libs.versions.toml | 12 +----------- settings.gradle.kts | 4 ---- worldguard-bukkit/build.gradle.kts | 9 --------- worldguard-libs/core/build.gradle.kts | 4 +++- 11 files changed, 7 insertions(+), 61 deletions(-) delete mode 100644 build-logic/src/main/kotlin/buildlogic/CommonJavaExtension.kt diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 17868974..8c51ba4c 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -4,10 +4,6 @@ repositories { gradlePluginPortal() - maven { - name = "EngineHub Repository" - url = uri("https://maven.enginehub.org/repo/") - } } dependencies { @@ -16,7 +12,6 @@ implementation(libs.grgit) implementation(libs.shadow) implementation(libs.jfrog.buildinfo) - implementation(libs.paperweight) implementation(libs.gson) constraints { diff --git a/build-logic/src/main/kotlin/buildlogic.common-java.gradle.kts b/build-logic/src/main/kotlin/buildlogic.common-java.gradle.kts index 2271301f..89526875 100644 --- a/build-logic/src/main/kotlin/buildlogic.common-java.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.common-java.gradle.kts @@ -8,9 +8,6 @@ id("buildlogic.common") } -val commonJava = extensions.create("commonJava") -commonJava.banSlf4j.convention(true) - tasks .withType() .matching { it.name == "compileJava" || it.name == "compileTestJava" } @@ -40,9 +37,6 @@ "testImplementation"(platform(stringyLibs.getLibrary("junit-bom"))) "testImplementation"(stringyLibs.getLibrary("junit-jupiter-api")) "testImplementation"(stringyLibs.getLibrary("junit-jupiter-params")) - "testImplementation"(platform(stringyLibs.getLibrary("mockito-bom"))) - "testImplementation"(stringyLibs.getLibrary("mockito-core")) - "testImplementation"(stringyLibs.getLibrary("mockito-junit-jupiter")) "testRuntimeOnly"(stringyLibs.getLibrary("junit-jupiter-engine")) } @@ -66,16 +60,6 @@ withSourcesJar() } -configurations["compileClasspath"].apply { - resolutionStrategy.componentSelection { - withModule("org.slf4j:slf4j-api") { - if (commonJava.banSlf4j.get()) { - reject("No SLF4J allowed on compile classpath") - } - } - } -} - tasks.named("check").configure { dependsOn("checkstyleMain", "checkstyleTest") } diff --git a/build-logic/src/main/kotlin/buildlogic.libs.gradle.kts b/build-logic/src/main/kotlin/buildlogic.libs.gradle.kts index f10cd29a..ca37db66 100644 --- a/build-logic/src/main/kotlin/buildlogic.libs.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.libs.gradle.kts @@ -47,9 +47,6 @@ override fun apply(project: Project) { exclude { it.moduleGroup == "org.jetbrains.kotlin" } - - include(dependency("org.enginehub:squirrelid")) - include(dependency("org.khelekore:prtree")) } relocations.forEach { (from, to) -> @@ -122,7 +119,7 @@ override fun apply(project: Project) { attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY)) attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED)) attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR)) - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16) + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21) } outgoing.artifact(tasks.named("jar")) } @@ -137,7 +134,7 @@ override fun apply(project: Project) { attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY)) attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED)) attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR)) - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16) + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21) } outgoing.artifact(tasks.named("jar")) } diff --git a/build-logic/src/main/kotlin/buildlogic.platform.gradle.kts b/build-logic/src/main/kotlin/buildlogic.platform.gradle.kts index a8eb61dc..b1221c82 100644 --- a/build-logic/src/main/kotlin/buildlogic.platform.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.platform.gradle.kts @@ -10,7 +10,7 @@ include(project(":worldguard-core")) relocate("org.flywaydb", "com.sk89q.worldguard.internal.flywaydb") { - include(dependency("org.flywaydb:flyway-core:3.0")) + include(dependency("org.flywaydb:flyway-core")) } exclude("com.google.code.findbugs:jsr305") } diff --git a/build-logic/src/main/kotlin/buildlogic/CommonJavaExtension.kt b/build-logic/src/main/kotlin/buildlogic/CommonJavaExtension.kt deleted file mode 100644 index 8631f537..00000000 --- a/build-logic/src/main/kotlin/buildlogic/CommonJavaExtension.kt +++ /dev/null @@ -1,7 +0,0 @@ -package buildlogic - -import org.gradle.api.provider.Property - -interface CommonJavaExtension { - val banSlf4j: Property -} diff --git a/build.gradle.kts b/build.gradle.kts index a6b538a4..aa62db09 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,6 @@ import org.ajoberstar.grgit.Grgit plugins { - alias(libs.plugins.codecov) id("buildlogic.common") id("buildlogic.artifactory-root") } diff --git a/config/checkstyle/import-control.xml b/config/checkstyle/import-control.xml index b00f80c2..abb251d1 100644 --- a/config/checkstyle/import-control.xml +++ b/config/checkstyle/import-control.xml @@ -7,7 +7,6 @@ - diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b85664ed..ccd97285 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,3 @@ -[plugins] -codecov = "org.enginehub.codecov:0.2.0" - [versions] worldedit = "7.3.0" @@ -9,7 +6,7 @@ minimumAsm = "9.7" minimumJdependency = "2.10" minimumTinyRemapper = "0.8.11" -lang-version = "1450" +# lang-version = "" [libraries] @@ -18,8 +15,6 @@ grgit = "org.ajoberstar.grgit:grgit-gradle:5.2.2" shadow = "com.github.johnrengelman:shadow:8.1.1" jfrog-buildinfo = "org.jfrog.buildinfo:build-info-extractor-gradle:5.2.0" -paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.7.1" - squirrelid = "org.enginehub:squirrelid:0.3.2" autoService = "com.google.auto.service:auto-service:1.1.1" @@ -32,10 +27,6 @@ junit-jupiter-api.module = "org.junit.jupiter:junit-jupiter-api" junit-jupiter-params.module = "org.junit.jupiter:junit-jupiter-params" junit-jupiter-engine.module = "org.junit.jupiter:junit-jupiter-engine" -mockito-bom = "org.mockito:mockito-bom:5.11.0" -mockito-core.module = "org.mockito:mockito-core" -mockito-junit-jupiter.module = "org.mockito:mockito-junit-jupiter" - spigot = "org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT" paperApi = "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT" paperLib = "io.papermc:paperlib:1.0.8" @@ -45,7 +36,6 @@ bstats-bukkit = "org.bstats:bstats-bukkit:2.2.1" prtree = "org.khelekore:prtree:1.5.0" -# Also update in build-logic/src/main/kotlin/buildlogic.platform.gradle.kts flyway-core = "org.flywaydb:flyway-core:3.0" commandbook = "com.sk89q:commandbook:2.3" diff --git a/settings.gradle.kts b/settings.gradle.kts index 8c213582..d0ca0d3e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,10 +1,6 @@ pluginManagement { repositories { gradlePluginPortal() - maven { - name = "EngineHub" - url = uri("https://maven.enginehub.org/repo/") - } } } plugins { diff --git a/worldguard-bukkit/build.gradle.kts b/worldguard-bukkit/build.gradle.kts index f2346904..34d128a0 100644 --- a/worldguard-bukkit/build.gradle.kts +++ b/worldguard-bukkit/build.gradle.kts @@ -5,13 +5,6 @@ id("buildlogic.platform") } -repositories { - maven { - name = "Spigot" - url = uri("https://hub.spigotmc.org/nexus/content/groups/public") - } -} - val localImplementation = configurations.create("localImplementation") { description = "Dependencies used locally, but provided by the runtime Bukkit implementation" isCanBeConsumed = false @@ -58,11 +51,9 @@ include(dependency(":worldguard-core")) include(dependency("org.bstats:")) include(dependency("io.papermc:paperlib")) - include(dependency("co.aikar:minecraft-timings")) relocate("org.bstats", "com.sk89q.worldguard.bukkit.bstats") relocate("io.papermc.lib", "com.sk89q.worldguard.bukkit.paperlib") - relocate("co.aikar.timings.lib", "com.sk89q.worldguard.bukkit.timingslib") } } diff --git a/worldguard-libs/core/build.gradle.kts b/worldguard-libs/core/build.gradle.kts index 94f4841f..ebfc595b 100644 --- a/worldguard-libs/core/build.gradle.kts +++ b/worldguard-libs/core/build.gradle.kts @@ -3,6 +3,8 @@ } dependencies { - "shade"(libs.squirrelid) + "shade"(libs.squirrelid) { + isTransitive = false + } "shade"(libs.prtree) }