Enable ABI splits

This is somewhat convenient for development, as it means that Android
Studio will only do a native build for the architecture of the device
being used for testing.

This is ignored for AABs, so it won't affect release builds (at least
for Google Play).
This commit is contained in:
leo60228 authored and Misa Elizabeth Kai committed 2023-10-25 14:44:34 -07:00
1 parent 4229372c2e
commit f3f9d1b523
2 files changed
+53 -4

No files matched your search

@@ -20,7 +20,6 @@ android {
externalNativeBuild {
cmake {
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
}
@@ -63,6 +62,12 @@ android {
}
}
}
splits {
abi {
enable true
}
}
}
dependencies {
@@ -8,12 +8,56 @@
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "armeabi-v7a"
}
],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
"outputFile": "app-armeabi-v7a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
}
],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
}
],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-x86-release.apk"
}
],
"elementType": "File"