feat: 用 productFlavors 区分调试和发布包名
dev: com.xiaoqu.watch(调试用,和旧版不冲突,可直接装到手表) prod: com.witClean.watch(正式发布,用旧签名打包走 OTA 升级) 日常开发选 devDebug,发布时选 prodRelease + witcleaning2.keystore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ android {
|
|||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.witClean.watch"
|
applicationId = "com.xiaoqu.watch"
|
||||||
minSdk = 27
|
minSdk = 27
|
||||||
targetSdk = 27
|
targetSdk = 27
|
||||||
versionCode = 183
|
versionCode = 183
|
||||||
@@ -19,6 +19,21 @@ android {
|
|||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 发布时用 productFlavors 切换包名:
|
||||||
|
// dev: com.xiaoqu.watch(调试用,和旧版不冲突)
|
||||||
|
// prod: com.witClean.watch(正式发布,旧版 OTA 升级)
|
||||||
|
flavorDimensions += "env"
|
||||||
|
productFlavors {
|
||||||
|
create("dev") {
|
||||||
|
dimension = "env"
|
||||||
|
applicationId = "com.xiaoqu.watch"
|
||||||
|
}
|
||||||
|
create("prod") {
|
||||||
|
dimension = "env"
|
||||||
|
applicationId = "com.witClean.watch"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
buildConfigField("String", "SERVICE_URL", "\"https://app.updatexiaoqu.com:9443/\"")
|
buildConfigField("String", "SERVICE_URL", "\"https://app.updatexiaoqu.com:9443/\"")
|
||||||
|
|||||||
Reference in New Issue
Block a user