Skip to content

Commit

Permalink
Set artifact urls for the Mojang maven repo in the correct place.
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Apr 1, 2024
1 parent 4b5f62e commit ba8124e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/fabricmc/loom/LoomRepositoryPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
});
}

Expand Down

0 comments on commit ba8124e

Please sign in to comment.