mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 05:05:20 -05:00
Merge with Fabric 1.1, stage 3
This commit is contained in:
@@ -53,7 +53,7 @@ public class RemapTaskConfiguration {
|
||||
final TaskContainer tasks = project.getTasks();
|
||||
final LoomGradleExtension extension = LoomGradleExtension.get(project);
|
||||
|
||||
if (getBooleanProperty(project, "fabric.loom.dontRemap")) {
|
||||
if (GradleUtils.getBooleanProperty(project, Constants.Properties.DONT_REMAP)) {
|
||||
extension.getUnmappedModCollection().from(project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME));
|
||||
return;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class RemapTaskConfiguration {
|
||||
}
|
||||
});
|
||||
|
||||
if (getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
if (GradleUtils.getBooleanProperty(project, Constants.Properties.DISABLE_REMAPPED_VARIANTS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class RemapTaskConfiguration {
|
||||
|
||||
tasks.named(BasePlugin.ASSEMBLE_TASK_NAME).configure(task -> task.dependsOn(remapSourcesTask));
|
||||
|
||||
if (getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
if (GradleUtils.getBooleanProperty(project, "fabric.loom.disableRemappedVariants")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -177,15 +177,4 @@ 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