diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 7c272aa20a..47e8191eb9 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -14,6 +14,13 @@ repositories { includeGroup "net.neoforged" } } + maven { + name = "MojangMeta" + url = "https://maven.neoforged.net/mojang-meta" + content { + includeModule("net.neoforged", "minecraft-dependencies") + } + } } dependencies { @@ -21,7 +28,11 @@ dependencies { // ../settings.gradle sets these version properties accordingly implementation "net.neoforged:moddev-gradle:${gradle.parent.ext.moddevgradle_plugin_version}" - implementation "com.google.code.gson:gson:${gradle.parent.ext.gson_version}" + implementation(platform("net.neoforged:minecraft-dependencies:${gradle.parent.ext.minecraft_version}") { + exclude group: 'org.ow2.asm' // The platform requests a strictly lower version of ASM and we bump it + }) + + implementation "com.google.code.gson:gson" implementation "io.codechicken:DiffPatch:${gradle.parent.ext.diffpatch_version}" implementation "org.ow2.asm:asm:${gradle.parent.ext.asm_version}" diff --git a/coremods/build.gradle b/coremods/build.gradle index dc92c1c7b8..313ab18fa7 100644 --- a/coremods/build.gradle +++ b/coremods/build.gradle @@ -20,9 +20,11 @@ java { } dependencies { + compileOnly(platform("net.neoforged:minecraft-dependencies:${project.minecraft_version}")) + compileOnly "org.slf4j:slf4j-api" + compileOnly "com.google.code.gson:gson" + compileOnly "org.jetbrains:annotations:${project.jetbrains_annotations_version}" - compileOnly "com.google.code.gson:gson:${gson_version}" - compileOnly "org.slf4j:slf4j-api:${slf4j_api_version}" compileOnly "net.neoforged.fancymodloader:loader:${project.fancy_mod_loader_version}" } diff --git a/coremods/settings.gradle b/coremods/settings.gradle deleted file mode 100644 index 06c2cf68e4..0000000000 --- a/coremods/settings.gradle +++ /dev/null @@ -1,8 +0,0 @@ -repositories { - maven { url = 'https://maven.neoforged.net/releases' } - maven { - name 'Mojang' - url 'https://libraries.minecraft.net' - } - mavenCentral() -} diff --git a/gradle.properties b/gradle.properties index 1ddec3e0fc..b823928de3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -41,20 +41,11 @@ mixin_version=0.15.2+mixin.0.8.7 terminalconsoleappender_version=1.3.0 nightconfig_version=3.8.0 jetbrains_annotations_version=24.0.1 -slf4j_api_version=2.0.7 apache_maven_artifact_version=3.9.9 jarjar_version=0.4.1 fancy_mod_loader_version=6.0.6 -mojang_logging_version=1.1.1 -log4j_version=2.22.1 -guava_version=31.1.2-jre -gson_version=2.10.1 -apache_commons_lang3_version=3.13.0 -jopt_simple_version=5.0.4 -commons_io_version=2.13.0 typetools_version=0.6.3 nashorn_core_version=15.3 -lwjgl_glfw_version=3.3.2 mixin_extras_version=0.4.1 jupiter_api_version=5.10.2 diff --git a/projects/neoforge/build.gradle b/projects/neoforge/build.gradle index 38ddc0d546..83547a7e42 100644 --- a/projects/neoforge/build.gradle +++ b/projects/neoforge/build.gradle @@ -118,8 +118,6 @@ dependencies { libraries ("net.neoforged:JarJarSelector:${project.jarjar_version}") { exclude group: 'org.slf4j' } - // We depend on apache commons directly as there is a difference between the version the server uses and the one the client does - libraries "org.apache.commons:commons-lang3:${project.apache_commons_lang3_version}" libraries ("net.neoforged:JarJarMetadata:${project.jarjar_version}") { exclude group: 'org.slf4j' } diff --git a/settings.gradle b/settings.gradle index edb9c51a52..41141aba43 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,7 +13,7 @@ plugins { // This makes the version available to buildSrc gradle.ext.moddevgradle_plugin_version = moddevgradle_plugin_version -gradle.ext.gson_version = gson_version +gradle.ext.minecraft_version = minecraft_version gradle.ext.diffpatch_version = diffpatch_version gradle.ext.asm_version = asm_version