ARM64 Windows & Linux support for MC versions that have classpath natives. Closes #675

This commit is contained in:
modmuss50
2022-06-26 00:02:46 +01:00
parent da2992e7d9
commit 3700fad9ca
5 changed files with 145 additions and 77 deletions

View File

@@ -1,7 +1,7 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2021 FabricMC
* Copyright (c) 2021-2022 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -117,4 +117,22 @@ public class LoomRepositoryPlugin implements Plugin<PluginAware> {
});
});
}
public static void forceLWJGLFromMavenCentral(Project project) {
// Force LWJGL from central, as it contains all the platform natives.
MavenArtifactRepository central = project.getRepositories().maven(repo -> {
repo.setName("MavenCentralLWJGL");
repo.setUrl(ArtifactRepositoryContainer.MAVEN_CENTRAL_URL);
repo.content(content -> {
content.includeGroup("org.lwjgl");
});
});
project.getRepositories().exclusiveContent(repository -> {
repository.forRepositories(central);
repository.filter(filter -> {
filter.includeGroup("org.lwjgl");
});
});
}
}