fix:第一轮跑

This commit is contained in:
jingyun committed 2026-08-24 19:07:31 +08:00
1 parent e834ec7586
commit 33235f450b
56 files changed
+4357 -210

No files matched your search

+31 -2
View File
@@ -14,6 +14,16 @@ if (!androidSigningPropertiesFile.isFile) {
}
androidSigningPropertiesFile.inputStream().use { androidSigningProperties.load(it) }
val umengProperties = Properties()
val umengPropertiesFile = rootProject.file("../assets/env/.env")
if (umengPropertiesFile.isFile) {
umengPropertiesFile.inputStream().use { umengProperties.load(it) }
}
fun umengBuildValue(name: String): String =
System.getenv(name)?.takeIf { it.isNotBlank() }
?: umengProperties.getProperty(name)?.trim().orEmpty()
fun requireSigningProperty(name: String): String {
val value = androidSigningProperties.getProperty(name)?.trim()
if (value.isNullOrBlank()) {
@@ -47,7 +57,9 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.jinzhi.app"
// Temporary U-Verify test identity: the Yanting AppKey/login secret
// loaded from assets/env/.env is registered against this package.
applicationId = "com.yanting.read"
// 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
@@ -55,15 +67,32 @@ android {
versionCode = flutter.versionCode
versionName = flutter.versionName
val umengChannel = System.getenv("UMENG_CHANNEL") ?: ""
val umengChannel = umengBuildValue("UMENG_CHANNEL").ifBlank { "test" }
manifestPlaceholders.putAll(
mutableMapOf(
"UMENG_CHANNEL" to umengChannel,
"UMENG_APPKEY" to umengBuildValue("UMENG_ANDROID_APP_KEY"),
"UMENG_MESSAGE_SECRET" to umengBuildValue("UMENG_ANDROID_PUSH_SECRET"),
"XIAOMI_APP_ID" to umengBuildValue("XIAOMI_APP_ID"),
"XIAOMI_APP_KEY" to umengBuildValue("XIAOMI_APP_KEY"),
"OPPO_APP_KEY" to umengBuildValue("OPPO_APP_KEY"),
"OPPO_APP_SECRET" to umengBuildValue("OPPO_APP_SECRET"),
"MEIZU_APP_ID" to umengBuildValue("MEIZU_APP_ID"),
"MEIZU_APP_KEY" to umengBuildValue("MEIZU_APP_KEY"),
"HUAWEI_APP_ID" to umengBuildValue("HUAWEI_APP_ID"),
"HONOR_APP_ID" to umengBuildValue("HONOR_APP_ID"),
"VIVO_APP_KEY" to umengBuildValue("VIVO_APP_KEY"),
"VIVO_APP_ID" to umengBuildValue("VIVO_APP_ID"),
)
)
}
buildTypes {
debug {
// U-Verify checks the app signing certificate. Use the same
// registered signing identity as release, like Yanting does.
signingConfig = signingConfigs.getByName("release")
}
release {
signingConfig = signingConfigs.getByName("release")
proguardFiles(