feat: disable cache dex
This commit is contained in:
@@ -508,6 +508,10 @@ public class InnerCoreServer {
|
||||
return getPropertyBoolean("display-ticking-errors-to-players", true);
|
||||
}
|
||||
|
||||
public static boolean canReconvertJava() {
|
||||
return getPropertyBoolean("reconvert-java", false);
|
||||
}
|
||||
|
||||
public static boolean canOverridePlayerUUID(){
|
||||
return getPropertyBoolean("override-player-uuid", true);
|
||||
}
|
||||
@@ -689,7 +693,7 @@ public class InnerCoreServer {
|
||||
|
||||
public static void printStackTrace(String message) {
|
||||
try {
|
||||
throw Context.reportRuntimeError("Error");
|
||||
throw Context.reportRuntimeError(message);
|
||||
} catch (Exception e) {
|
||||
System.out.println(ICLog.getStackTrace(e));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhekasmirnov.innercore.mod.executable;
|
||||
|
||||
import com.googlecode.d2j.dex.Dex2jar;
|
||||
import com.googlecode.dex2jar.tools.Jar2Dex;
|
||||
import com.reider745.InnerCoreServer;
|
||||
import com.zhekasmirnov.innercore.api.log.ICLog;
|
||||
import com.zhekasmirnov.innercore.api.mod.API;
|
||||
import com.zhekasmirnov.innercore.mod.build.BuildConfig;
|
||||
@@ -196,7 +197,7 @@ public class Compiler {
|
||||
File jarFile = new File(
|
||||
(dexFileAbsolute.endsWith(".dex") ? dexFileAbsolute.substring(0, dexFileAbsolute.length() - 4)
|
||||
: dexFileAbsolute) + ".jar");
|
||||
if (!jarFile.isFile()) {
|
||||
if (!jarFile.isFile() || InnerCoreServer.canReconvertJava()) {
|
||||
Dex2jar dex2jar = Dex2jar.from(dexFile);
|
||||
dex2jar.to(jarFile.toPath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user