本次提交新增了以下核心内容: 1. 后端管理模块:包含字体同步、插件元数据、插件用户设置、稍后读消息/共享列表的控制器、模型、验证器与多语言配置 2. Flutter数据同步模块:统一的事件总线与兼容层,替代分散的StreamController 3. 鸿蒙端路由适配:完整的路由定义、构建器与占位组件 4. 后端API接口:字体同步与插件更新的服务端API,支持自动建表与跨域请求 5. 鸿蒙权限校验脚本:用于校验module.json5与string.json的权限声明一致性
72 lines
2.1 KiB
Kotlin
72 lines
2.1 KiB
Kotlin
plugins {
|
||
id("com.android.application")
|
||
id("kotlin-android")
|
||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||
id("dev.flutter.flutter-gradle-plugin")
|
||
}
|
||
|
||
android {
|
||
namespace = "apps.xy.xianyan"
|
||
compileSdk = flutter.compileSdkVersion
|
||
ndkVersion = flutter.ndkVersion
|
||
|
||
compileOptions {
|
||
isCoreLibraryDesugaringEnabled = true
|
||
sourceCompatibility = JavaVersion.VERSION_11
|
||
targetCompatibility = JavaVersion.VERSION_11
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||
}
|
||
|
||
defaultConfig {
|
||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||
applicationId = "apps.xy.xianyan"
|
||
// You can update the following values to match your application needs.
|
||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||
minSdk = 28
|
||
targetSdk = flutter.targetSdkVersion
|
||
versionCode = flutter.versionCode
|
||
versionName = flutter.versionName
|
||
|
||
// 排除 armeabi-v7a 以减小包体积,支持 arm64-v8a + x86_64(模拟器/Chrome OS)
|
||
ndk {
|
||
abiFilters.clear()
|
||
abiFilters.add("arm64-v8a")
|
||
// abiFilters.add("x86_64")
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
// TODO: Add your own signing config for the release build.
|
||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||
signingConfig = signingConfigs.getByName("debug")
|
||
|
||
// release 包同样排除 armeabi-v7a
|
||
ndk {
|
||
abiFilters.clear()
|
||
abiFilters.add("arm64-v8a")
|
||
// abiFilters.add("x86_64")
|
||
}
|
||
}
|
||
}
|
||
|
||
// 16KB 页面大小支持 — Android 15+ 设备使用 16KB 内存页对齐
|
||
// 确保 .so 文件以 16KB 对齐方式存储,避免在 16KB 页大小设备上崩溃
|
||
packaging {
|
||
jniLibs {
|
||
useLegacyPackaging = false
|
||
}
|
||
}
|
||
}
|
||
|
||
flutter {
|
||
source = "../.."
|
||
}
|
||
|
||
dependencies {
|
||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
||
}
|