android: package only the ABIs we actually build for
The first working APK carried libjnidispatch.so for armeabi, mips and mips64 as well as our four — JNA's .aar still ships those, and AGP packages whatever it finds. Android dropped mips in NDK r17 and armeabi in r17 too; nothing that can install this app can load them, so they are pure payload. abiFilters pins the set to the four the Rust is actually cross-compiled for, so the APK's ABI list matches the build's intent rather than the union of every dependency's history. Found by unpacking the artifact rather than trusting the green: the run said "Upload debug APK ✓", which is true and says nothing about what is inside it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -162,6 +162,16 @@ android {
|
||||
(project.findProperty("THOUGHTSYNC_VERSION_CODE") as String?)?.toIntOrNull()
|
||||
versionCode = codeOverride ?: 1
|
||||
versionName = nameOverride ?: "dev"
|
||||
|
||||
// Package ONLY the ABIs we build for.
|
||||
//
|
||||
// Without this the APK also carries armeabi, mips and mips64 — dead
|
||||
// architectures Android dropped years ago, which arrive because JNA's
|
||||
// .aar still ships a libjnidispatch.so for each. They can never be
|
||||
// loaded on any device this app supports, so they are pure payload.
|
||||
ndk {
|
||||
abiFilters += androidAbis
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
Reference in New Issue
Block a user