gradle: allow to define TeaVM properties from gradle command line

This commit is contained in:
Alexey Andreev 2023-04-12 16:48:48 +02:00
parent b927b28e7d
commit 09cdc63267

View File

@ -103,13 +103,14 @@ class TeaVMBaseExtensionImpl implements TeaVMBaseExtension {
@Override
public Provider<String> property(String name) {
return properties.map(p -> {
var gradleName = "teavm." + name;
return project.getProviders().systemProperty(gradleName).orElse(properties.map(p -> {
var result = p.getProperty(name);
if (result != null) {
return result;
}
return project.getProviders().gradleProperty("teavm." + name).getOrElse(null);
});
return project.getRootProject().getProviders().gradleProperty(gradleName).getOrElse(null);
}));
}
@Override