Support setting custom ABI list

Also stop building riscv64 by default
This commit is contained in:
topjohnwu
2024-08-01 14:33:08 -07:00
parent 9093be1329
commit 1539cfe888
7 changed files with 71 additions and 41 deletions
+6
View File
@@ -8,6 +8,8 @@ import java.util.Properties
private val props = Properties()
private var commitHash = ""
private val supportAbis = setOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64", "riscv64")
private val defaultAbis = setOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64")
object Config {
operator fun get(key: String): String? {
@@ -20,6 +22,10 @@ object Config {
val version: String get() = get("version") ?: commitHash
val versionCode: Int get() = get("magisk.versionCode")!!.toInt()
val stubVersion: String get() = get("magisk.stubVersion")!!
val abiList: Set<String> get() {
val abiList = get("abiList") ?: return defaultAbis
return abiList.split(Regex("\\s*,\\s*")).toSet() intersect supportAbis
}
}
class MagiskPlugin : Plugin<Project> {