mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 05:05:20 -05:00
Only realise the gradle property being queried.
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
@@ -157,17 +157,13 @@ public class RemapTaskConfiguration {
|
||||
}
|
||||
|
||||
private static boolean getBooleanProperty(Project project, String key) {
|
||||
boolean result = false;
|
||||
Object value = project.getProperties().get(key);
|
||||
|
||||
if (value instanceof String) {
|
||||
return project.getProviders().gradleProperty(key).map(string -> {
|
||||
try {
|
||||
result = Boolean.parseBoolean((String) value);
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
// False
|
||||
return Boolean.parseBoolean(string);
|
||||
} catch (final IllegalArgumentException ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
.getOrElse(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user