Switched to ES6 language level
This commit is contained in:
@@ -36,7 +36,7 @@ allprojects{
|
||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||
appName = 'Mindustry'
|
||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||
rhinoVersion = '66ffaf9ba089cc4e6b83cd7a9a397488cd15bf87'
|
||||
rhinoVersion = 'eeb327d141146663ff3924bd20d2a5da8a6439cc'
|
||||
|
||||
loadVersionProps = {
|
||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.net.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class Scripts implements Disposable{
|
||||
private final static Object[] emptyObjects = {};
|
||||
private final Seq<String> blacklist = Seq.with("net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
||||
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "arc.events", "java.util.function", "java.util.stream");
|
||||
@@ -34,6 +33,7 @@ public class Scripts implements Disposable{
|
||||
context = Vars.platform.getScriptContext();
|
||||
context.setClassShutter(type -> !blacklist.contains(type.toLowerCase()::contains) || whitelist.contains(type.toLowerCase()::contains));
|
||||
context.getWrapFactory().setJavaPrimitiveWrap(false);
|
||||
context.setLanguageVersion(Context.VERSION_ES6);
|
||||
|
||||
scope = new ImporterTopLevel(context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user