mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Brings in libnativedecoderjni.so for arm64-v8a (from Iu-yang1/Look4Sat-FT4, the Morse Expert 1.15 official Play arm64 split) and lifts the ABI pin from armeabi-v7a-only to armeabi-v7a + arm64-v8a in both feature/cw and app. 64-bit devices now load the native decoder natively instead of falling back to ARM32 (or crashing when the arm64 lib was missing).
40 lines
1.2 KiB
Kotlin
40 lines
1.2 KiB
Kotlin
import com.android.build.api.dsl.LibraryExtension
|
|
import com.android.build.api.variant.CanProduceConsumerProguardFiles
|
|
|
|
plugins {
|
|
alias(libs.plugins.convention.featurePlugin)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.rtbishop.look4sat.feature.cw"
|
|
compileOptions {
|
|
encoding = "UTF-8"
|
|
}
|
|
// Morse Expert 1.15 官方 Play 分包提供 ARM32/ARM64 原生解码器
|
|
// (jniLibs/armeabi-v7a + arm64-v8a), 两个 ABI 都打进 APK
|
|
defaultConfig {
|
|
ndk {
|
|
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
|
}
|
|
}
|
|
}
|
|
|
|
// CW 类保持规则(JNI 按类名注册 + 照搬混淆类保逻辑), 由 app 的 R8 消费
|
|
// AGP 9: consumer 规则走 variant 级 CanProduceConsumerProguardFiles
|
|
androidComponents {
|
|
onVariants(selector().all()) { variant ->
|
|
(variant as? CanProduceConsumerProguardFiles)?.consumerProguardFiles?.add(
|
|
project.layout.projectDirectory.file("proguard-rules.pro")
|
|
)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
|
}
|
|
|
|
// 照搬的 Java 源码含中文注释, 强制 UTF-8 编译(compileOptions 在部分 AGP 版本不生效)
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.encoding = "UTF-8"
|
|
}
|