mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
gradle: fix issues with new source file property
This commit is contained in:
parent
bdd0193eb8
commit
2bd76e2da5
|
@ -21,6 +21,7 @@ import org.gradle.api.Action;
|
|||
import org.gradle.api.Project;
|
||||
import org.gradle.api.model.ObjectFactory;
|
||||
import org.teavm.gradle.api.OptimizationLevel;
|
||||
import org.teavm.gradle.api.SourceFilePolicy;
|
||||
import org.teavm.gradle.api.TeaVMCConfiguration;
|
||||
import org.teavm.gradle.api.TeaVMCommonConfiguration;
|
||||
import org.teavm.gradle.api.TeaVMExtension;
|
||||
|
@ -67,6 +68,9 @@ class TeaVMExtensionImpl extends TeaVMBaseExtensionImpl implements TeaVMExtensio
|
|||
js.getAddedToWebApp().convention(property("js.addedToWebApp").map(Boolean::parseBoolean).orElse(false));
|
||||
js.getOptimization().convention(property("js.optimization").map(OptimizationLevel::valueOf)
|
||||
.orElse(OptimizationLevel.BALANCED));
|
||||
js.getSourceFilePolicy().convention(property("js.sourceFilePolicy")
|
||||
.map(SourceFilePolicy::valueOf)
|
||||
.orElse(SourceFilePolicy.DO_NOTHING));
|
||||
}
|
||||
|
||||
private void setupWasmDefaults() {
|
||||
|
|
|
@ -157,7 +157,9 @@ public class TeaVMPlugin implements Plugin<Project> {
|
|||
));
|
||||
var tmpConfig = project.getConfigurations().detachedConfiguration(sourcesDep);
|
||||
tmpConfig.setTransitive(false);
|
||||
result.addAll(tmpConfig.getFiles());
|
||||
if (!tmpConfig.getResolvedConfiguration().hasError()) {
|
||||
result.addAll(tmpConfig.getResolvedConfiguration().getLenientConfiguration().getFiles());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user