Add the NeoForgedRepositoryFilter to address the issues associated with NeoForge Maven using the Maven Central repository#328
Add the NeoForgedRepositoryFilter to address the issues associated with NeoForge Maven using the Maven Central repository#328Gu-ZT wants to merge 3 commits intoneoforged:mainfrom
Conversation
Gu-ZT
commented
Mar 19, 2026
- fixed Neoforged Maven Central Mirror Missing interfaceinjection.json Artifacts #327
|
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #327 by ensuring Maven Central is prioritized ahead of ModDevGradle-managed repositories, preventing Gradle from “sticking” to the NeoForged Maven Central mirror when some artifact classifiers (e.g., *-interfaceinjection.json) are missing.
Changes:
- Reorders Maven Central to be inserted before managed repositories during project/settings evaluation.
- Adds functional tests verifying Maven Central precedes the managed repositories in both project and settings contexts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/main/java/net/neoforged/moddevgradle/internal/RepositoriesPlugin.java |
Adds Maven Central detection + post-evaluation reordering logic to place it before managed repos. |
src/test/java/net/neoforged/moddevgradle/functional/RepositoriesPluginFunctionalTest.java |
New Gradle TestKit functional coverage to validate repository ordering behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
src/main/java/net/neoforged/moddevgradle/internal/RepositoriesPlugin.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/moddevgradle/internal/RepositoriesPlugin.java
Outdated
Show resolved
Hide resolved
b2567b8 to
a67787c
Compare
|
This slows down resolution of our artifacts, so I am not terribly convinced. The more correct solution is to filter the NeoForge repository to serve just our artifacts via content filtering. |
like this? repositories.maven(repo -> {
repo.setName("NeoForged Releases");
repo.setUrl(URI.create("https://maven.neoforged.net/releases/"));
repo.content(content -> {
content.includeGroupByRegex("com\\.google.*");
content.includeGroupByRegex("net\\.neoforged.*");
content.includeGroupByRegex("net\\.minecraftforge.*");
content.includeGroupByRegex("net\\.fabricmc.*");
content.includeGroupByRegex("net\\.jodah.*");
content.includeGroupByRegex("org\\.apache.*");
content.includeGroupByRegex("org\\.codehaus.*");
content.includeGroup("com.electronwill.night-config");
content.includeGroup("com.machinezoo.noexception");
content.includeGroup("cpw.mods");
content.includeGroup("com.nothome");
content.includeGroup("de.siegmar");
content.includeGroup("io.codechicken");
content.includeGroup("it.unimi.dsi");
content.includeGroup("net.covers1624");
content.includeGroup("net.minecrell");
content.includeGroup("net.sf.jopt-simple");
content.includeGroup("org.antlr");
content.includeGroup("org.checkerframework");
content.includeGroup("org.jetbrains");
content.includeGroup("org.jline");
content.includeGroup("org.openjdk.nashorn");
content.includeGroup("org.ow2.asm");
content.includeGroup("org.tukaani");
content.includeGroup("org.vineflower");
content.includeGroup("trove");
content.includeModule("io.github.llamalad7", "mixinextras-neoforge");
});
}); |
eaaa595 to
46be846
Compare
…roved dependency management