mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Split apks by architecture when building
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
b13777c2da
commit
06b2db1f60
2 changed files with 25 additions and 2 deletions
|
@ -27,6 +27,8 @@ fun runCommand(command: String): String {
|
||||||
return String(byteOut.toByteArray()).trim()
|
return String(byteOut.toByteArray()).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86")
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = AndroidVersions.compileSdk
|
compileSdk = AndroidVersions.compileSdk
|
||||||
|
|
||||||
|
@ -45,9 +47,19 @@ android {
|
||||||
buildConfigField("Boolean", "INCLUDE_UPDATER", "false")
|
buildConfigField("Boolean", "INCLUDE_UPDATER", "false")
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters += setOf("armeabi-v7a", "arm64-v8a", "x86")
|
abiFilters += supportedAbis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
splits {
|
||||||
|
abi {
|
||||||
|
isEnable = true
|
||||||
|
reset()
|
||||||
|
include(*supportedAbis.toTypedArray())
|
||||||
|
isUniversalApk = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
applicationIdSuffix = ".debugJ2K"
|
applicationIdSuffix = ".debugJ2K"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.data.updater.github
|
package eu.kanade.tachiyomi.data.updater.github
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import eu.kanade.tachiyomi.data.updater.Release
|
import eu.kanade.tachiyomi.data.updater.Release
|
||||||
|
|
||||||
|
@ -23,7 +24,17 @@ class GithubRelease(
|
||||||
* @return download link of latest release.
|
* @return download link of latest release.
|
||||||
*/
|
*/
|
||||||
override val downloadLink: String
|
override val downloadLink: String
|
||||||
get() = assets[0].downloadLink
|
get() {
|
||||||
|
val apkVariant = when (Build.SUPPORTED_ABIS[0]) {
|
||||||
|
"arm64-v8a" -> "-arm64-v8a"
|
||||||
|
"armeabi-v7a" -> "-armeabi-v7a"
|
||||||
|
"x86", "x86_64" -> "-x86"
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return assets.find { it.downloadLink.contains("tachiyomij2k$apkVariant-") }?.downloadLink
|
||||||
|
?: assets[0].downloadLink
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assets class containing download url.
|
* Assets class containing download url.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue