diff --git a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java b/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java index d1632e3e6..480d3d8b4 100644 --- a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java +++ b/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java @@ -24,6 +24,8 @@ package net.fabricmc.loom; +import java.util.List; + import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.artifacts.ArtifactRepositoryContainer; @@ -40,6 +42,14 @@ import net.fabricmc.loom.util.MirrorUtil; public class LoomRepositoryPlugin implements Plugin { + private static final List FORGE_GROUPS = List.of( + "net.minecraftforge", + "cpw.mods", + "de.oceanlabs", + "net.jodah", + "org.mcmodlauncher" + ); + @Override public void apply(@NotNull PluginAware target) { if (target instanceof Settings settings) { @@ -95,9 +105,11 @@ private void declareRepositories(RepositoryHandler repositories, LoomFiles files repo.setUrl("https://maven.minecraftforge.net/"); repo.content(descriptor -> { - descriptor.excludeGroupByRegex("org\\.eclipse\\.?.*"); - // Some of these downloads hang and this is already available from central to begin with. - descriptor.excludeGroup("org.ow2.asm"); + // Only include these groups to avoid slowing down/hanging the build, + // or downloading incorrect artifacts. + for (String group : FORGE_GROUPS) { + descriptor.includeGroupAndSubgroups(group); + } }); repo.metadataSources(sources -> { sources.mavenPom();