mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Allow developer set the site where to download game resource.(0.9 branch) (#442)
* Add mirrors util and mirror configuration
* Fix NPE in MirrorConfiguration;
Add constants in Constants;
Rename Mirrors.java to MirrorUtil.java
* Bump gradle nightly version
* Apply mirror to download assets.
Need fix settings in LoomRepositoryPlugin.java
* Fix MojangMappingsSpec having the same hash version for each mc version.
I dont think this would be a real cause for concern as the jar would have had the mc version in it anyway.
* Revert "Fix MojangMappingsSpec having the same hash version for each mc version."
This reverts commit 61fa4d9f
* Remove MirrorConfiguration and move to MirrorUtil
* StyleCheck.
* Fix "IllegalStateException: The root project is not yet available for build."
* Remove some of the extra content.
Co-authored-by: BreakIce <suibing112233@outlook.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
This commit is contained in:
@@ -30,11 +30,14 @@ import org.gradle.api.artifacts.dsl.RepositoryHandler;
|
||||
import org.gradle.api.artifacts.repositories.IvyArtifactRepository;
|
||||
import org.gradle.api.initialization.Settings;
|
||||
import org.gradle.api.invocation.Gradle;
|
||||
import org.gradle.api.plugins.ExtensionAware;
|
||||
import org.gradle.api.plugins.PluginAware;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import net.fabricmc.loom.extension.LoomFiles;
|
||||
|
||||
import net.fabricmc.loom.util.MirrorUtil;
|
||||
|
||||
public class LoomRepositoryPlugin implements Plugin<PluginAware> {
|
||||
@Override
|
||||
public void apply(@NotNull PluginAware target) {
|
||||
@@ -63,11 +66,11 @@ public class LoomRepositoryPlugin implements Plugin<PluginAware> {
|
||||
});
|
||||
repositories.maven(repo -> {
|
||||
repo.setName("Fabric");
|
||||
repo.setUrl("https://maven.fabricmc.net/");
|
||||
repo.setUrl(MirrorUtil.getFabricRepository((ExtensionAware) target));
|
||||
});
|
||||
repositories.maven(repo -> {
|
||||
repo.setName("Mojang");
|
||||
repo.setUrl("https://libraries.minecraft.net/");
|
||||
repo.setUrl(MirrorUtil.getLibrariesBase((ExtensionAware) target));
|
||||
});
|
||||
repositories.mavenCentral();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user