From e61758d3dfb8431a8d509b0f32964ae80f7d8c70 Mon Sep 17 00:00:00 2001 From: Matt <4009945+MattBDev@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:31:48 -0400 Subject: [PATCH] Finished adding lin-bus to the dependencies --- buildSrc/src/main/kotlin/CommonJavaConfig.kt | 3 +++ buildSrc/src/main/kotlin/LibsConfig.kt | 10 ++++++++++ gradle/libs.versions.toml | 1 + worldedit-core/build.gradle.kts | 15 ++++++++++++++- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/CommonJavaConfig.kt b/buildSrc/src/main/kotlin/CommonJavaConfig.kt index 549a26037..38568a455 100644 --- a/buildSrc/src/main/kotlin/CommonJavaConfig.kt +++ b/buildSrc/src/main/kotlin/CommonJavaConfig.kt @@ -1,3 +1,4 @@ +import org.gradle.api.Action import org.gradle.api.Project import org.gradle.api.attributes.java.TargetJvmVersion import org.gradle.api.plugins.JavaPluginExtension @@ -10,6 +11,8 @@ import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.withType +import org.gradle.plugins.ide.idea.GenerateIdeaModule +import org.gradle.plugins.ide.idea.model.IdeaProject fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean = true) { applyCommonConfiguration() diff --git a/buildSrc/src/main/kotlin/LibsConfig.kt b/buildSrc/src/main/kotlin/LibsConfig.kt index 695bb8e3c..690a21590 100644 --- a/buildSrc/src/main/kotlin/LibsConfig.kt +++ b/buildSrc/src/main/kotlin/LibsConfig.kt @@ -48,6 +48,9 @@ fun Project.applyLibrariesConfiguration() { configurations = listOf(project.configurations["shade"]) archiveClassifier.set("") + // Yeet module-info's + exclude("module-info.class") + dependencies { exclude(dependency("com.google.guava:guava")) exclude(dependency("com.google.code.gson:gson")) @@ -55,6 +58,9 @@ fun Project.applyLibrariesConfiguration() { exclude(dependency("org.checkerframework:checker-qual")) exclude(dependency("org.apache.logging.log4j:log4j-api")) exclude(dependency("com.google.code.findbugs:jsr305")) + exclude { + it.moduleGroup == "org.jetbrains.kotlin" + } } relocations.forEach { (from, to) -> @@ -84,6 +90,10 @@ fun Project.applyLibrariesConfiguration() { from({ altConfigFiles("sources") }) + + // Yeet module-info's + exclude("module-info.java") + relocations.forEach { (from, to) -> val filePattern = Regex("(.*)${from.replace('.', '/')}((?:/|$).*)") val textPattern = Regex.fromLiteral(from) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9e0aafc2c..2d7bfe2ac 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -102,6 +102,7 @@ paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref vault = { group = "com.github.MilkBowl", name = "VaultAPI", version.ref = "vault" } serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" } checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" } +paranamer = { group = "com.thoughtworks.paranamer", name = "paranamer", version = "2.6" } # Internal ## Text diff --git a/worldedit-core/build.gradle.kts b/worldedit-core/build.gradle.kts index a58230b2c..be11973cb 100644 --- a/worldedit-core/build.gradle.kts +++ b/worldedit-core/build.gradle.kts @@ -27,11 +27,24 @@ dependencies { implementation(libs.guava) implementation(libs.gson) + implementation(libs.paranamer) + implementation(libs.jchronic) + implementation(libs.jlibnoise) + api(platform(libs.linBusBom)) + api(libs.linBusTree) { + exclude(group = "org.jetbrains", module = "annotations") + } + api(libs.linBusFormatSnbt) { + exclude(group = "org.jetbrains", module = "annotations") + } + // Platform expectations implementation(libs.snakeyaml) // Logging - implementation(libs.log4jApi) + implementation(libs.log4jApi) { + because("Mojang provides Log4j") + } // Plugins compileOnly(libs.plotSquaredCore) { isTransitive = false }