snapshot: 存档 flutter create 模板覆盖后的现场,作为多实例修复前的基线

This commit is contained in:
2026-10-22 21:59:09 +08:00
parent 40d4af322b
commit 56c26e2fd5
14 changed files with 104 additions and 246 deletions
+15 -38
View File
@@ -1,11 +1,12 @@
plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.lxh.qingting_player"
compileSdk = 36
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
@@ -14,49 +15,25 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.lxh.qingting_player"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = 34
versionCode = flutter.versionCode
versionName = flutter.versionName
// 仅打包 arm64-v8a
ndk {
abiFilters.addAll(listOf("arm64-v8a"))
}
}
// 显式指定 jniLibs 源目录
sourceSets {
getByName("main") {
jniLibs.srcDirs("src/main/jniLibs")
}
}
tasks.withType<Copy> {
if (name.startsWith("merge") && name.endsWith("JniLibFolders")) {
from("src/main/jniLibs")
into("$buildDir/intermediates/merged_jni_libs/debug/out")
}
}
// 打包配置
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
pickFirsts += "**/*.so"
targetSdk = flutter.targetSdkVersion
// Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
// is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
// You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
// flag during build.
versionCode = 1
versionName = "1.0.0"
}
buildTypes {
debug {
}
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")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
}
@@ -69,4 +46,4 @@ kotlin {
flutter {
source = "../.."
}
}