Android 根据productFlavor设置applicationIdSuffix
我们有2种Android 根据productFlavor设置applicationIdSuffix,android,gradle,build.gradle,Android,Gradle,Build.gradle,我们有2种productFlavors(testServer、liveServer)和2种构建类型(debug、release) 由于现有的API键,我必须基于buildType+productFlavor追加包名 例如: buildTypes { debug { applicationIdSuffix '.dbg' + (testServer ? '.test' : '.live') } release { applicationidSuffix '' + (test
productFlavors
(testServer、liveServer)和2种构建类型(debug、release)
由于现有的API键,我必须基于buildType+productFlavor追加包名
例如:
buildTypes {
debug {
applicationIdSuffix '.dbg' + (testServer ? '.test' : '.live')
}
release {
applicationidSuffix '' + (testServer ? '.test')
}
}
这可能吗?怎么做
productFlavors {
testServer {
applicationId = "com.example.my.pkg.test"
}
liveServer {
applicationId = "com.example.my.pkg.live"
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
}
}
有关更多信息,请查看有关应用程序ID的