flutter_integrated_whb/android/app/build.gradle.kts

65 lines
1.8 KiB
Plaintext
Raw Normal View History

2025-07-31 20:22:25 +08:00
import java.util.Properties
2025-07-11 11:03:21 +08:00
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")
}
2025-07-31 20:22:25 +08:00
// 🔐 加载 key.properties
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(keystorePropertiesFile.inputStream())
}
2025-07-11 11:03:21 +08:00
android {
namespace = "com.zhuoyun.qhdprevention.qhd_prevention"
compileSdk = flutter.compileSdkVersion
ndkVersion = "28.1.13356709"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
applicationId = "com.zhuoyun.qhdprevention.qhd_prevention"
minSdk = 22
2025-07-11 11:03:21 +08:00
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
2025-08-27 16:14:10 +08:00
// // ✅ 添加 release 签名配置
// signingConfigs {
// create("release") {
// storeFile = file(keystoreProperties["storeFile"] as String)
// storePassword = keystoreProperties["storePassword"] as String
// keyAlias = keystoreProperties["keyAlias"] as String
// keyPassword = keystoreProperties["keyPassword"] as String
// }
// }
//
// buildTypes {
// release {
// // ✅ 替换成 release 签名
// signingConfig = signingConfigs.getByName("release")
// isMinifyEnabled = false
// isShrinkResources = false
// }
// debug {
// signingConfig = signingConfigs.getByName("debug")
// }
// }
2025-07-11 11:03:21 +08:00
}
flutter {
source = "../.."
}