From 4eb62ee064d583a90b827118607f29a203c6487b Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:55:06 +0200 Subject: [PATCH] Fix gradle sync --- .../net/neoforged/neodev/NeoDevExtraPlugin.java | 6 +----- coremods/build.gradle | 9 --------- coremods/settings.gradle | 8 ++++++++ projects/neoforge/build.gradle | 16 ++++++++++++---- 4 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 coremods/settings.gradle diff --git a/buildSrc/src/main/java/net/neoforged/neodev/NeoDevExtraPlugin.java b/buildSrc/src/main/java/net/neoforged/neodev/NeoDevExtraPlugin.java index fabb8f75ac..883d0b29d7 100644 --- a/buildSrc/src/main/java/net/neoforged/neodev/NeoDevExtraPlugin.java +++ b/buildSrc/src/main/java/net/neoforged/neodev/NeoDevExtraPlugin.java @@ -43,11 +43,7 @@ public void apply(Project project) { var writeNeoDevConfig = neoForgeProject.getTasks().named("writeNeoDevConfig", WriteUserDevConfig.class); Consumer configureLegacyClasspath = spec -> { - spec.getDependencies().addLater(mcAndNeoFormVersion.map(v -> dependencyFactory.create("net.neoforged:neoform:" + v).capabilities(caps -> { - caps.requireCapability("net.neoforged:neoform-dependencies"); - }))); - spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "installer")); - spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "moduleOnly")); + spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "modDevRuntimeElements")); spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "userdevCompileOnly")); // TODO: Convert into a cross-project dependency too spec.getDependencies().add( diff --git a/coremods/build.gradle b/coremods/build.gradle index 3d942a4701..127e7ec9df 100644 --- a/coremods/build.gradle +++ b/coremods/build.gradle @@ -5,15 +5,6 @@ plugins { id 'neoforge.formatting-conventions' } -repositories { - maven { url = 'https://maven.neoforged.net/releases' } - maven { - name 'Mojang' - url 'https://libraries.minecraft.net' - } - mavenCentral() -} - jar { manifest { attributes( diff --git a/coremods/settings.gradle b/coremods/settings.gradle new file mode 100644 index 0000000000..06c2cf68e4 --- /dev/null +++ b/coremods/settings.gradle @@ -0,0 +1,8 @@ +repositories { + maven { url = 'https://maven.neoforged.net/releases' } + maven { + name 'Mojang' + url 'https://libraries.minecraft.net' + } + mavenCentral() +} diff --git a/projects/neoforge/build.gradle b/projects/neoforge/build.gradle index ea85103b01..5b1791385e 100644 --- a/projects/neoforge/build.gradle +++ b/projects/neoforge/build.gradle @@ -13,6 +13,9 @@ plugins { apply plugin : net.neoforged.neodev.NeoDevPlugin +// Because of the source set reference. +evaluationDependsOn(":neoforge-coremods") + gradleutils.setupSigning(project: project, signAllPublications: true) changelog { @@ -67,6 +70,9 @@ neoDev { minecraft { sourceSet sourceSets.main } + "neoforge-coremods" { + sourceSet project(":neoforge-coremods").sourceSets.main + } } } @@ -106,6 +112,12 @@ dependencies { strictly project.asm_version } } + // Also override ASM in implementation + implementation(asmModule) { + version { + strictly project.asm_version + } + } } moduleOnly "cpw.mods:bootstraplauncher:${project.bootstraplauncher_version}" moduleOnly "net.neoforged:JarJarFileSystems:${project.jarjar_version}" @@ -162,10 +174,6 @@ dependencies { neoDev { runs { - configureEach { - gameDirectory.set project.file("run/${it.name}") as File - modSources.add project(":neoforge-coremods").sourceSets.main - } client { client() }