Browse Source

app: read signing info from a keystore.properties file

* This file is gitignore'd. An example is provided which must
  be copied and modified for a user to successfully build.
pull/465/head
Dan Pasanen 6 years ago
parent
commit
7ed5562fb4
  1. 1
      .gitignore
  2. 15
      app/build.gradle
  3. 4
      keystore.properties.example

1
.gitignore vendored

@ -3,6 +3,7 @@
build/ build/
# local configuration file (sdk path, etc) # local configuration file (sdk path, etc)
keystore.properties
local.properties local.properties
signing.gradle signing.gradle

15
app/build.gradle

@ -22,10 +22,17 @@ android {
} }
signingConfigs { signingConfigs {
releaseConfig { releaseConfig {
keyAlias 'transdroid' def propsFile = rootProject.file('keystore.properties')
keyPassword '' def configName = 'releaseConfig'
storeFile file('../../erickok.keystore')
storePassword '' if (propsFile.exists() && android.signingConfigs.hasProperty(configName)) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
keyAlias = props['keyAlias']
storeFile = file(props['storeFile'])
keyPassword = props['keyPassword']
storePassword = props['storePassword']
}
} }
} }
buildTypes { buildTypes {

4
keystore.properties.example

@ -0,0 +1,4 @@
keyAlias=transdroid
keyPassword=123456
storeFile=/home/user/transdroid.keystore
storePassword=123456
Loading…
Cancel
Save