You should not.
Release keystore
is the most sensitive data.
In my team, there is only one people can sign the release package. (And may be one for backing up).
All sensitive info MUST be ignored and we make a reference to these info.
In my team, we config like that:
On Android Studio
:
/local.properties
file:
storeFile=[path/to/keystore/file]
keyAlias=[alias's key]
keyPassword=[alias's password]
storePassword=[key's password]
/app/build.gradle
, config
scope:
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
}
.
.
.
}
See my complete demo 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'
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…