- 修改应用 ID 为 top.jdysya.dashboard - 添加互联网权限 - 更新签名配置 - 修改测试目标应用 ID - 更新依赖版本: - async: 2.12.0 -> 2.13.0 - fake_async: 1.3.2 -> 1.3.3 - leak_tracker: 10.0.8 -> 10.0.9 - vm_service: 14.3.1 -> 15.0.0 - 移除了一些冗余的代码和配置
67 lines
2.1 KiB
Plaintext
67 lines
2.1 KiB
Plaintext
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
|
|
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")
|
|
}
|
|
|
|
val keystoreProperties = Properties()
|
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace = "top.jdysya.dashboard"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion = "27.0.12077973"
|
|
|
|
compileOptions {
|
|
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 = "top.jdysya.dashboard"
|
|
// 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
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
}
|
|
}
|
|
|
|
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("release")
|
|
}
|
|
debug {
|
|
// Debug 版本添加后缀,例如 ".debug"
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|