Update TeaVM for ESM support

We still need our fork (file attributes, some Math/Int/Long methods),
but this simplifies things a wee bit.
This commit is contained in:
Jonathan Coates 2024-03-13 13:01:25 +00:00
parent 7ee821e9c9
commit 6fb291112d
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,7 @@ mixinGradle = "0.7.38"
nullAway = "0.9.9"
spotless = "6.23.3"
taskTree = "2.1.1"
teavm = "0.10.0-SQUID.2"
teavm = "0.10.0-SQUID.3"
vanillaExtract = "0.1.1"
versionCatalogUpdate = "0.8.1"

View File

@ -4,6 +4,7 @@
package cc.tweaked.web.builder;
import org.teavm.backend.javascript.JSModuleType;
import org.teavm.common.JsonUtil;
import org.teavm.tooling.ConsoleTeaVMToolLog;
import org.teavm.tooling.TeaVMProblemRenderer;
@ -71,6 +72,7 @@ private static void buildClasses(List<Path> input, List<Path> classpath, Path ou
// Then finally start the compiler!
var tool = new TeaVMTool();
tool.setTargetType(TeaVMTargetType.JAVASCRIPT);
tool.setJsModuleType(JSModuleType.ES2015);
tool.setTargetDirectory(output.toFile());
tool.setClassLoader(remapper);
tool.setMainClass("cc.tweaked.web.Main");