mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 21:47:42 -05:00
Add versions used to compile/build against to jar manifest (#428)
* Add versions used to compile/build against to jar manifest
* checkstyle
* Move to post remap
* Fix build
* Add mc version and mixin group
* Typo
* Make test run across versions better.
(cherry picked from commit 2259a4efc8)
Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
@@ -140,27 +140,29 @@ public class LoomDependencyManager {
|
||||
String platformSuffix = extension.isForge() ? "_forge" : "";
|
||||
String mappingsKey = mappingsProvider.getMappingsKey() + platformSuffix;
|
||||
|
||||
if (extension.getInstallerJson() == null && !extension.isForge()) {
|
||||
if (extension.getInstallerData() == null && !extension.isForge()) {
|
||||
//If we've not found the installer JSON we've probably skipped remapping Fabric loader, let's go looking
|
||||
project.getLogger().info("Searching through modCompileClasspath for installer JSON");
|
||||
final Configuration configuration = project.getConfigurations().getByName(Constants.Configurations.MOD_COMPILE_CLASSPATH);
|
||||
|
||||
for (File input : configuration.resolve()) {
|
||||
JsonObject jsonObject = ModProcessor.readInstallerJson(input, project);
|
||||
for (Dependency dependency : configuration.getAllDependencies()) {
|
||||
for (File input : configuration.files(dependency)) {
|
||||
JsonObject jsonObject = ModProcessor.readInstallerJson(input, project);
|
||||
|
||||
if (jsonObject != null) {
|
||||
if (extension.getInstallerJson() != null) {
|
||||
project.getLogger().info("Found another installer JSON in, ignoring it! " + input);
|
||||
continue;
|
||||
if (jsonObject != null) {
|
||||
if (extension.getInstallerData() != null) {
|
||||
project.getLogger().info("Found another installer JSON in, ignoring it! " + input);
|
||||
continue;
|
||||
}
|
||||
|
||||
project.getLogger().info("Found installer JSON in " + input);
|
||||
extension.setInstallerData(new InstallerData(dependency.getVersion(), jsonObject));
|
||||
handleInstallerJson(jsonObject, project);
|
||||
}
|
||||
|
||||
project.getLogger().info("Found installer JSON in " + input);
|
||||
extension.setInstallerJson(jsonObject);
|
||||
handleInstallerJson(extension.getInstallerJson(), project);
|
||||
}
|
||||
}
|
||||
|
||||
if (extension.getInstallerJson() == null) {
|
||||
if (extension.getInstallerData() == null) {
|
||||
project.getLogger().warn("fabric-installer.json not found in classpath!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user