mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 09:07:48 -04:00
[DISABLED] Add experimental support for proguard.
This commit is contained in:
parent
a7fad6100c
commit
c2036a1886
11
app_pojavlauncher/proguard-rules.pro
vendored
11
app_pojavlauncher/proguard-rules.pro
vendored
@ -15,4 +15,13 @@
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}
|
||||
|
||||
# We use Reflection on the builder to avoid creating too many objects
|
||||
-keep class net.objecthunter.exp4j.ExpressionBuilder**
|
||||
-keepclassmembers class net.objecthunter.exp4j.ExpressionBuilder** {
|
||||
*;
|
||||
}
|
||||
# Option screens
|
||||
-keep class net.kdt.pojavlaunch.prefs.screens** {*;}
|
||||
|
||||
|
||||
|
@ -4,10 +4,12 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
@Keep
|
||||
public class ExitActivity extends AppCompatActivity {
|
||||
public static void showExitMessage(Context ctx, int code) {
|
||||
Intent i = new Intent(ctx,ExitActivity.class);
|
||||
|
@ -1,9 +1,12 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import java.util.Map;
|
||||
import net.kdt.pojavlaunch.value.*;
|
||||
import java.util.*;
|
||||
|
||||
@Keep
|
||||
public class JMinecraftVersionList {
|
||||
public static final String TYPE_OLD_ALPHA = "old_alpha";
|
||||
public static final String TYPE_OLD_BETA = "old_beta";
|
||||
@ -12,6 +15,7 @@ public class JMinecraftVersionList {
|
||||
public Map<String, String> latest;
|
||||
public Version[] versions;
|
||||
|
||||
@Keep
|
||||
public static class Version {
|
||||
// Since 1.13, so it's one of ways to check
|
||||
public Arguments arguments;
|
||||
@ -34,15 +38,19 @@ public class JMinecraftVersionList {
|
||||
public String url;
|
||||
public String sha1;
|
||||
}
|
||||
@Keep
|
||||
public static class JavaVersionInfo {
|
||||
public String component;
|
||||
public int majorVersion;
|
||||
}
|
||||
|
||||
// Since 1.13
|
||||
@Keep
|
||||
public static class Arguments {
|
||||
public Object[] game;
|
||||
public Object[] jvm;
|
||||
|
||||
@Keep
|
||||
public static class ArgValue {
|
||||
public ArgRules[] rules;
|
||||
public String value;
|
||||
@ -50,12 +58,14 @@ public class JMinecraftVersionList {
|
||||
// TLauncher styled argument...
|
||||
public String[] values;
|
||||
|
||||
@Keep
|
||||
public static class ArgRules {
|
||||
public String action;
|
||||
public String features;
|
||||
}
|
||||
}
|
||||
}
|
||||
@Keep
|
||||
public static class AssetIndex {
|
||||
public String id, sha1, url;
|
||||
public long size, totalSize;
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
@ -8,6 +10,7 @@ import java.lang.ref.WeakReference;
|
||||
/** Singleton class made to log on one file
|
||||
* The singleton part can be removed but will require more implementation from the end-dev
|
||||
*/
|
||||
@Keep
|
||||
public class Logger {
|
||||
private static Logger loggerSingleton = null;
|
||||
|
||||
|
@ -17,6 +17,11 @@ import org.lwjgl.glfw.*;
|
||||
import static net.kdt.pojavlaunch.LWJGLGLFWKeycode.GLFW_KEY_UNKNOWN;
|
||||
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@Keep
|
||||
public class ControlData {
|
||||
|
||||
public static final int SPECIALBTN_KEYBOARD = -1;
|
||||
@ -250,7 +255,9 @@ public class ControlData {
|
||||
expression = new WeakReference<>(builder.get().getClass().getDeclaredField("expression"));
|
||||
expression.get().setAccessible(true);
|
||||
expression.get().set(expression.get(), expression.get().getModifiers() & ~Modifier.FINAL);
|
||||
}catch (Exception ignored){}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,14 +10,16 @@ import static net.kdt.pojavlaunch.customcontrols.ControlDrawerData.Orientation.R
|
||||
import static net.kdt.pojavlaunch.customcontrols.ControlDrawerData.Orientation.UP;
|
||||
import static net.kdt.pojavlaunch.customcontrols.ControlDrawerData.Orientation.FREE;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
@Keep
|
||||
public class ControlDrawerData {
|
||||
|
||||
public ArrayList<ControlData> buttonProperties;
|
||||
public ControlData properties;
|
||||
public Orientation orientation;
|
||||
|
||||
@Keep
|
||||
public enum Orientation {
|
||||
DOWN,
|
||||
LEFT,
|
||||
|
@ -1,5 +1,8 @@
|
||||
package net.kdt.pojavlaunch.customcontrols;
|
||||
import android.content.*;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.google.gson.*;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -7,6 +10,7 @@ import java.util.*;
|
||||
import net.kdt.pojavlaunch.*;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
@Keep
|
||||
public class CustomControls {
|
||||
public int version = -1;
|
||||
public float scaledAt;
|
||||
|
@ -47,10 +47,10 @@ public class RefreshVersionListTask extends AsyncTask<Void, Void, ArrayList<Stri
|
||||
mActivity.mVersionList.versions = versions.toArray(new JMinecraftVersionList.Version[versions.size()]);
|
||||
Log.i("ExtVL","Final list size: " + mActivity.mVersionList.versions.length);
|
||||
}
|
||||
ArrayList<String> versionStringList = filter(mActivity.mVersionList.versions, new File(Tools.DIR_HOME_VERSION).listFiles());
|
||||
|
||||
return versionStringList;
|
||||
return filter(mActivity.mVersionList.versions, new File(Tools.DIR_HOME_VERSION).listFiles());
|
||||
} catch (Exception e){
|
||||
System.out.println("Refreshing version list failed !");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
|
@ -1,12 +1,15 @@
|
||||
package net.kdt.pojavlaunch.value;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
@Keep
|
||||
public class DependentLibrary {
|
||||
public String name;
|
||||
public LibraryDownloads downloads;
|
||||
public String url;
|
||||
|
||||
public static class LibraryDownloads
|
||||
{
|
||||
@Keep
|
||||
public static class LibraryDownloads {
|
||||
public MinecraftLibraryArtifact artifact;
|
||||
public LibraryDownloads(MinecraftLibraryArtifact artifact) {
|
||||
this.artifact = artifact;
|
||||
|
Loading…
x
Reference in New Issue
Block a user