2015-11-18 18 views
13

チームでアンドロイドアプリを開発しています。署名付きapkを作成するには、キーストアパス、パスワード、キーエイリアス、およびキーパスワードを設定する必要があります。私が私と私のチームメンバーが署名したapkを同じ署名で作成できるのであれば、キーストアファイルをソース管理にコミットする必要がありますか?Androidアプリのリリースキーストアをチームリポジトリにコミットする必要がありますか?

+0

は忘れないでください:(あなたはgithubのを使用している場合)あなたが無料のgitアカウントをお持ちの場合は、リポジトリは誰も –

+0

のために表示されますいいえ、私たちはgitの – mao

+1

と私たちのプライベートサーバーを使用する。これは、多少の意見に基づいている - 私の会社で私たちはアンドロイドプロジェクトでgitサブモジュールとして使う別々のgitリポジトリにキーストアを持っています。それはこれまでのところ良い解決策でした。 – 1615903

答えて

15

すべきではありません。

Release keystoreが最も感度の高いデータです。

私のチームには、リリースパッケージに署名できるのは1人だけです。 (バックアップのためのものかもしれません)。

すべての機密情報MUSTは無視してください。これらの情報は参考にしています。私のチームで

、我々はそのように設定:

Android Studioで:

/local.propertiesファイル:

storeFile=[path/to/keystore/file] 
keyAlias=[alias's key] 
keyPassword=[alias's password] 
storePassword=[key's password] 

/app/build.gradleconfig範囲:

signingConfigs { 
    release { 
    Properties properties = new Properties() 
    properties.load(project.rootProject.file('local.properties').newDataInputStream()) 
    storeFile file(properties.getProperty('storeFile')) 
    keyAlias properties.getProperty('keyAlias') 
    storePassword properties.getProperty('storePassword') 
    keyPassword properties.getProperty('keyPassword') 
    } 
} 

buildTypes { 
    release { 
    minifyEnabled false 
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    signingConfig signingConfigs.release 
    } 
    . 
    . 
    . 
} 

は私の完全なデモを参照してください。 config:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 21 
    buildToolsVersion "22.0.1" 

    defaultConfig { 
     multiDexEnabled = true 

     applicationId "com.appconus.demoapp" 
     minSdkVersion 16 
     targetSdkVersion 21 
     multiDexEnabled = true 
     versionCode 18 
     versionName "1.3" 
    } 

    signingConfigs { 
     release { 
      Properties properties = new Properties() 
      properties.load(project.rootProject.file('local.properties').newDataInputStream()) 
      storeFile file(properties.getProperty('storeFile')) 
      keyAlias properties.getProperty('keyAlias') 
      storePassword properties.getProperty('storePassword') 
      keyPassword properties.getProperty('keyPassword') 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.release 
     } 
     debug { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
     applicationVariants.all { variant -> 
      appendVersionNameVersionCode(variant, defaultConfig) 
     } 
    } 
} 
dependencies { 
    compile 'com.google.android.gms:play-services:8.1.0' 
} 
+0

これもここで説明します:https://developer.android.com/studio/publish/app-signing.html#secure-shared-keystore – scai

+3

唯一の人がキーストアを紛失した場合(ディスクの破損など)、新しいアプリをアップロードする必要があります。古いユーザーはアプリを更新できませんでした。私たちのチームはプライベートレポでキーストアをコミットしますが、サイン情報(storepass、keyalias、keypass)はプライベートです。 – Ninja

+0

@忍者:私たちは常に少なくとも2つのキーストアファイルのコピーを作成します:) – Justin

関連する問題