Set artifact urls for the Mojang maven repo in the correct place.

This commit is contained in:
modmuss50
2024-04-01 15:00:03 +01:00
parent 4b5f62e6b1
commit ba8124e2d6

View File

@@ -78,6 +78,10 @@ public class LoomRepositoryPlugin implements Plugin<PluginAware> {
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 class LoomRepositoryPlugin implements Plugin<PluginAware> {
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);
});
}