Files
netquality/client/android/app/build.gradle.kts
T
yanjiu0721 846e40c023 固定 1.1.3 的 Android 调试证书 (#4)
把已发布 1.1.3 APK 使用的调试密钥写入仓库,后续版本用同一把证书签名,以便覆盖安装。未改动 v1.1.3 标签,也未替换已发布安装包。
2026-11-21 20:27:01 +08:00

68 lines
2.3 KiB
Kotlin

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 = "dev.netquality.netquality"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "dev.netquality.netquality"
// 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 = 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 = flutter.versionCode
versionName = flutter.versionName
}
// 1.1.3 及以后的 debug / release 都用仓库里的这一把。缺文件就失败,不要回退到本机新建的 debug.keystore。
val sharedDebugKeystore = rootProject.file("keystore/debug.keystore")
if (!sharedDebugKeystore.isFile) {
throw GradleException(
"缺少 client/android/keystore/debug.keystore。后续版本必须沿用 1.1.3 的调试证书,不要另建密钥。",
)
}
signingConfigs {
getByName("debug") {
storeFile = sharedDebugKeystore
storePassword = "android"
keyAlias = "androiddebugkey"
keyPassword = "android"
}
}
buildTypes {
debug {
signingConfig = signingConfigs.getByName("debug")
}
release {
signingConfig = signingConfigs.getByName("debug")
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
flutter {
source = "../.."
}