diff --git a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java b/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java index ef9bd58ef..896c72df2 100644 --- a/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java +++ b/src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java @@ -78,6 +78,10 @@ private void declareRepositories(RepositoryHandler repositories, LoomFiles files sources.artifact(); sources.ignoreGradleMetadataRedirection(); }); + + // Fallback to maven central for artifacts such as sources or javadocs that are not mirrored on Mojang's repo. + // See: https://github.com/FabricMC/fabric-loom/issues/1032 + repo.artifactUrls(ArtifactRepositoryContainer.MAVEN_CENTRAL_URL); }); // If a mavenCentral repo is already defined, remove the mojang repo and add it back before the mavenCentral repo so that it will be checked first. @@ -117,10 +121,6 @@ public static void setupForLegacyVersions(RepositoryHandler repositories) { sources.artifact(); sources.ignoreGradleMetadataRedirection(); }); - - // Fallback to maven central for artifacts such as sources or javadocs that are not mirrored on Mojang's repo. - // See: https://github.com/FabricMC/fabric-loom/issues/1032 - repo.artifactUrls(ArtifactRepositoryContainer.MAVEN_CENTRAL_URL); }); }