首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Google Beta测试管理指向临时服务器和生产的APK

通过Google Beta测试管理指向临时服务器和生产的APK
EN

Stack Overflow用户
提问于 2016-09-14 21:16:24
回答 1查看 434关注 0票数 0

通过Google Play Store Beta测试平台管理测试的最佳实践是什么?

您是否通常有一个完全独立的应用程序列表,以及指向登台的构建,如果是这样,您将如何处理不同的签名证书?

或者你通过Alpha & Beta渠道管理一切?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-14 21:49:04

我通常不使用Google Play Beta,但经常使用Gradle更改试运行/生产/开发情况。

像下面这样编写你的应用gradle。

配置

代码语言:javascript
复制
configurations {
    stagingDebugCompile
    stagingReleaseCompile

    productionDebugCompile
    productionReleaseCompile

    developmentDebugCompile
    developmentReleaseCompile
}

签名配置

代码语言:javascript
复制
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
    }
}

构建类型

代码语言:javascript
复制
buildTypes {
    release {
        signingConfig signingConfigs.release
    }
    debug {
        signingConfig signingConfigs.debug
    }
}

产品风味

代码语言:javascript
复制
productFlavors {
    staging {
    }
    production {
    }
    development {
    }
}

别忘了放入release.gradle和debug.gradle文件。debug.gradle可能是这样的。

代码语言:javascript
复制
signingConfigs {                                                                                                                                              
    debug {
        def HOME = System.getProperty("user.home")
        storeFile file("${HOME}/.android/debug.keystore")
        storePassword "android"
        keyAlias "androiddebugkey"
        keyPassword "android"
    }
}
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39491478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档