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 @@ @@ -3,6 +3,7 @@
build/
# local configuration file (sdk path, etc)
keystore.properties
local.properties
signing.gradle

15
app/build.gradle

@ -22,10 +22,17 @@ android { @@ -22,10 +22,17 @@ android {
}
signingConfigs {
releaseConfig {
keyAlias 'transdroid'
keyPassword ''
storeFile file('../../erickok.keystore')
storePassword ''
def propsFile = rootProject.file('keystore.properties')
def configName = 'releaseConfig'
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 {

4
keystore.properties.example

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