- 更新应用名称为「暖记」(AndroidManifest + strings.xml) - 添加必要权限: INTERNET, CAMERA, READ_MEDIA_IMAGES, READ_EXTERNAL_STORAGE - 生成 release 签名密钥 (RSA 2048, 10000 天有效期) - 配置 ProGuard/R8 代码混淆 + 资源压缩 - 品牌化启动页: 奶油白背景 + 珊瑚色圆形「暖」字 logo - 品牌化应用图标: 各密度 mipmap (mdpi~xxxhdpi) - 添加阿里云 Maven 镜像加速依赖下载 - AGP 9.x 兼容: 自动为旧 Flutter 插件注入 namespace - Gradle 性能优化: 并行编译 + 构建缓存
31 lines
1.0 KiB
Kotlin
31 lines
1.0 KiB
Kotlin
pluginManagement {
|
|
val flutterSdkPath =
|
|
run {
|
|
val properties = java.util.Properties()
|
|
file("local.properties").inputStream().use { properties.load(it) }
|
|
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
|
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
|
flutterSdkPath
|
|
}
|
|
|
|
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
|
|
|
repositories {
|
|
// 阿里云 Maven 镜像 — 加速中国大陆依赖下载
|
|
maven { url = uri("https://maven.aliyun.com/repository/google") }
|
|
maven { url = uri("https://maven.aliyun.com/repository/central") }
|
|
maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
|
|
google()
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
|
id("com.android.application") version "9.0.1" apply false
|
|
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
|
|
}
|
|
|
|
include(":app")
|