Fix some patch problems
This commit is contained in:
parent
7dc4b09057
commit
3bc39e1e94
|
|
@ -1 +1,7 @@
|
|||
-dontobfuscate
|
||||
-keep class com.beust.jcommander.** { *; }
|
||||
-keep class org.lsposed.lspatch.Patcher$Options { *; }
|
||||
-keep class org.lsposed.lspatch.share.PatchConfig { *; }
|
||||
-keepclassmembers class org.lsposed.patch.LSPatch {
|
||||
private <fields>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ object Patcher {
|
|||
if (it.name?.endsWith(PATCH_FILE_SUFFIX) == true) it.delete()
|
||||
}
|
||||
lspApp.tmpApkDir.walk()
|
||||
.filter { it.isFile }
|
||||
.filter { it.name.endsWith(PATCH_FILE_SUFFIX) }
|
||||
.forEach { apk ->
|
||||
val file = root.createFile("application/vnd.android.package-archive", apk.name)
|
||||
?: throw IOException("Failed to create output file")
|
||||
|
|
|
|||
|
|
@ -2,14 +2,24 @@ package org.lsposed.lspatch.share;
|
|||
|
||||
public class LSPConfig {
|
||||
|
||||
public static final LSPConfig instance = new LSPConfig();
|
||||
public static final LSPConfig instance = factory();
|
||||
|
||||
public final int API_CODE = ${apiCode};
|
||||
public final int VERSION_CODE = ${verCode};
|
||||
public final String VERSION_NAME = "${verName}";
|
||||
public final int CORE_VERSION_CODE = ${coreVerCode};
|
||||
public final String CORE_VERSION_NAME = "${coreVerName}";
|
||||
public int API_CODE;
|
||||
public int VERSION_CODE;
|
||||
public String VERSION_NAME;
|
||||
public int CORE_VERSION_CODE;
|
||||
public String CORE_VERSION_NAME;
|
||||
|
||||
private LSPConfig() {
|
||||
}
|
||||
|
||||
private static LSPConfig factory() {
|
||||
LSPConfig config = new LSPConfig();
|
||||
config.API_CODE = ${apiCode};
|
||||
config.VERSION_CODE = ${verCode};
|
||||
config.VERSION_NAME = "${verName}";
|
||||
config.CORE_VERSION_CODE = ${coreVerCode};
|
||||
config.CORE_VERSION_NAME = "${coreVerName}";
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue