mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 21:47:42 -05:00
Fix issues resolving libraries and natives for old mc versions down to 1.3.2. (#584)
* Fix issues resolving libraries and natives for old mc versions. Add a simple integration tests. Fixes #583 and #582 * Test 1.6.4 and 1.3.2
This commit is contained in:
@@ -28,6 +28,7 @@ import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler;
|
||||
import org.gradle.api.artifacts.repositories.IvyArtifactRepository;
|
||||
import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
|
||||
import org.gradle.api.initialization.Settings;
|
||||
import org.gradle.api.invocation.Gradle;
|
||||
import org.gradle.api.plugins.ExtensionAware;
|
||||
@@ -92,4 +93,15 @@ public class LoomRepositoryPlugin implements Plugin<PluginAware> {
|
||||
repo.metadataSources(IvyArtifactRepository.MetadataSources::artifact);
|
||||
});
|
||||
}
|
||||
|
||||
public static void setupForLegacyVersions(Project project) {
|
||||
// 1.4.7 contains an LWJGL version with an invalid maven pom, set the metadata sources to not use the pom for this version.
|
||||
project.getRepositories().named("Mojang", MavenArtifactRepository.class, repo -> {
|
||||
repo.metadataSources(sources -> {
|
||||
// Only use the maven artifact and not the pom or gradle metadata.
|
||||
sources.artifact();
|
||||
sources.ignoreGradleMetadataRedirection();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user