Compilation for Android on Java 9+

This commit is contained in:
Anuken
2020-08-14 19:45:22 -04:00
parent 75606baf6a
commit b57fb47855
4 changed files with 22 additions and 1 deletions

View File

@@ -33,6 +33,8 @@ dependencies{
natives "com.github.Anuken.Arc:natives-android:${getArcHash()}" natives "com.github.Anuken.Arc:natives-android:${getArcHash()}"
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}" natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}" natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}"
if(localArc()) compileOnly fileTree(dir: '../../Arc/backends/backend-android/libs', include: ['*.jar'])
} }
task deploy(type: Copy){ task deploy(type: Copy){

View File

@@ -180,6 +180,15 @@ allprojects{
} }
} }
//compile with java 8 compatibility for everything except the annotati project
configure(subprojects - project(":annotations")){
tasks.withType(JavaCompile){
if(JavaVersion.current() != JavaVersion.VERSION_1_8){
options.compilerArgs.addAll(['--release', '8'])
}
}
}
project(":desktop"){ project(":desktop"){
apply plugin: "java" apply plugin: "java"

View File

@@ -501,7 +501,11 @@ public class LExecutor{
//this should avoid any garbage allocation //this should avoid any garbage allocation
Var v = exec.vars[value]; Var v = exec.vars[value];
if(v.isobj && value != 0){ if(v.isobj && value != 0){
String strValue = v.objval instanceof String ? (String)v.objval : v.objval == null ? "null" : "[object]"; String strValue = v.objval instanceof String ? (String)v.objval : v.objval == null ? "null" :
v.objval instanceof Content ? "[content]" :
v.objval instanceof Building ? "[building]" :
v.objval instanceof Unit ? "[unit]" :
"[object]";
exec.textBuffer.append(strValue); exec.textBuffer.append(strValue);
}else{ }else{

View File

@@ -73,6 +73,12 @@ public class Door extends Wall{
} }
} }
@Override
public double sense(LAccess sensor){
if(sensor == LAccess.enabled) return open ? 1 : 0;
return super.sense(sensor);
}
@Override @Override
public void control(LAccess type, double p1, double p2, double p3, double p4){ public void control(LAccess type, double p1, double p2, double p3, double p4){
if(type == LAccess.enabled){ if(type == LAccess.enabled){