mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 05:05:20 -05:00
Merge branch 'dev/0.12' into exp/0.13
This commit is contained in:
@@ -48,7 +48,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;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class RemapTaskConfiguration {
|
||||
|
||||
trySetupSourceRemapping(project);
|
||||
|
||||
if (!extension.getSetupRemappedVariants().get()) {
|
||||
if (getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,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;
|
||||
}
|
||||
|
||||
@@ -154,4 +154,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