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