管理APK通过Google Beta测试平台指向临时服务器和生产测试
问题描述:
通过Google Play商店Beta测试平台管理测试的最佳做法是什么,以管理指向登录&生产的APK?管理APK通过Google Beta测试平台指向临时服务器和生产测试
您是否通常有一个完全独立的应用程序列表,指向暂存的构建,如果有的话,您将如何处理不同的签署证书?
或者您是否通过Alpha & Beta渠道管理所有内容?
答
我通常不会使用Google Play Beta,但通常会使用Gradle更改分段/生产/开发情况。
在下面写下你的应用gradle。
配置
configurations {
stagingDebugCompile
stagingReleaseCompile
productionDebugCompile
productionReleaseCompile
developmentDebugCompile
developmentReleaseCompile
}
签约配置
signingConfigs {
def releaseSettingGradleFile = new File("${project.rootDir}/release.gradle")
if (releaseSettingGradleFile.exists()) {
apply from: releaseSettingGradleFile, to: android
} else {
release {
def debugSettingGradleFile = new File("${project.rootDir}/debug.gradle")
apply from: debugSettingGradleFile, to: android
}
}
def debugSettingGradleFile = new File("${project.rootDir}/debug.gradle")
debug {
apply from: debugSettingGradleFile, to: android
}
}
构建类型
buildTypes {
release {
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}
产品风味
productFlavors {
staging {
}
production {
}
development {
}
}
不要忘记放置release.gradle和debug.gradle文件。 debug.gradle可能是这样的。
signingConfigs {
debug {
def HOME = System.getProperty("user.home")
storeFile file("${HOME}/.android/debug.keystore")
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}