chore: add return type to IOLib.addTo
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2023-09-22 19:07:05 +02:00
parent 8c37393edf
commit 86e34a1f16
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ publishing {
}
tasks.compileKotlin {
destinationDirectory = tasks.compileJava.get().destinationDir
destinationDirectory = tasks.compileJava.get().destinationDirectory.asFile.orNull
}
tasks.javadoc {

View File

@ -10,7 +10,7 @@ import io.gitlab.jfronny.muscript.data.dynamic.additional.DFinal;
import java.util.List;
public class IOLib {
public static void addTo(MuScriptVersion version, Scope scope, IOWrapper io) {
public static Scope addTo(MuScriptVersion version, Scope scope, IOWrapper io) {
if (version.contains(MuScriptVersion.V3)) {
scope.set("readString", args -> {
if (args.size() != 1) throw new IllegalArgumentException("Invalid number of arguments for readString: expected 1 but got " + args.size());
@ -23,5 +23,6 @@ public class IOLib {
return script.bindTo(scope.fork()).call(innerArgs);
});
}
return scope;
}
}