mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 12:17:00 -05:00
Merge remote-tracking branch 'upstream/dev/0.12' into dev/0.12.0
# Conflicts: # src/main/java/net/fabricmc/loom/configuration/CompileConfiguration.java # src/main/java/net/fabricmc/loom/task/RemapTaskConfiguration.java
This commit is contained in:
@@ -53,7 +53,7 @@ public class RemapTaskConfiguration {
|
||||
final TaskContainer tasks = project.getTasks();
|
||||
final LoomGradleExtension extension = LoomGradleExtension.get(project);
|
||||
|
||||
if (!extension.getRemapArchives().get()) {
|
||||
if (getBooleanProperty(project, "fabric.loom.dontRemap")) {
|
||||
extension.getUnmappedModCollection().from(project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME));
|
||||
return;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class RemapTaskConfiguration {
|
||||
}
|
||||
});
|
||||
|
||||
if (!extension.getSetupRemappedVariants().get()) {
|
||||
if (getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class RemapTaskConfiguration {
|
||||
|
||||
tasks.named(BasePlugin.ASSEMBLE_TASK_NAME).configure(task -> task.dependsOn(remapSourcesTask));
|
||||
|
||||
if (!extension.getSetupRemappedVariants().get()) {
|
||||
if (getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -177,4 +177,15 @@ public class RemapTaskConfiguration {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static boolean getBooleanProperty(Project project, String key) {
|
||||
return project.getProviders().gradleProperty(key).map(string -> {
|
||||
try {
|
||||
return Boolean.parseBoolean(string);
|
||||
} catch (final IllegalArgumentException ex) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.getOrElse(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user