2016-09-14 8 views
0

Google Playストアベータテストプラットフォームを使用して&プロダクションをステージングするAPKでのテストを管理する場合のベストプラクティスは何ですか?Googleベータテストによるステージングサーバーとプロダクションを指すAPKの管理

ステージングを指しているビルドでは、通常、完全に別のアプリケーションリストを持っていますか?もしそうなら、さまざまな署名証明書をどのように扱いますか?

または、すべてをAlpha &ベータチャネル経由で管理していますか?

答えて

2

Google Playベータ版は通常使用しませんが、ステージング/制作/開発の状況を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" 
    } 
} 
関連する問題