Skip to content

Commit

Permalink
wasm gc: fix maven mojo that copies runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
konsoletyper committed Oct 22, 2024
1 parent 5c743bc commit 7a2cf55
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ public void execute() throws MojoExecutionException {
var resourceName = "org/teavm/backend/wasm/" + name + ".js";
var classLoader = TeaVMCopyWebassemblyGCRuntimeMojo.class.getClassLoader();
var output = new File(targetDirectory, runtimeFileName);
output.getParentFile().mkdirs();
try (var input = classLoader.getResourceAsStream(resourceName)) {
Files.copy(input, output.toPath(), StandardCopyOption.REPLACE_EXISTING);
}

if (deobfuscator) {
resourceName = "org/teavm/backend/wasm/deobfuscator.wasm";
output = new File(targetDirectory, deobfuscatorFileName);
output.getParentFile().mkdirs();
try (var input = classLoader.getResourceAsStream(resourceName)) {
Files.copy(input, output.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
Expand Down

0 comments on commit 7a2cf55

Please sign in to comment.