Skip to content

Commit

Permalink
- Added config for release build
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshakya037 committed Jun 16, 2019
1 parent 8c7dd34 commit 576748e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
5 changes: 4 additions & 1 deletion student/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/build

# Google Services (e.g. APIs or Firebase)
google-services.json
google-services.json

/keystore/release.jks
/keystore/release.keystore.properties
11 changes: 11 additions & 0 deletions student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
def keystorePropertiesFile = file("keystore/release.keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

storeFile file(keystoreProperties['store.file'])
storePassword keystoreProperties['key.store.password']
keyAlias keystoreProperties['key.alias']
keyPassword keystoreProperties['key.alias.password']
}
debug {
def keystorePropertiesFile = file("keystore/debug.keystore.properties")
def keystoreProperties = new Properties()
Expand All @@ -45,6 +55,7 @@ android {
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "app_name", getAppName(BuildType.RELEASE)
}
Expand Down
5 changes: 4 additions & 1 deletion teacher/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/build

# Google Services (e.g. APIs or Firebase)
google-services.json
google-services.json

/keystore/release.jks
/keystore/release.keystore.properties
11 changes: 11 additions & 0 deletions teacher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
def keystorePropertiesFile = file("keystore/release.keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

storeFile file(keystoreProperties['store.file'])
storePassword keystoreProperties['key.store.password']
keyAlias keystoreProperties['key.alias']
keyPassword keystoreProperties['key.alias.password']
}
debug {
def keystorePropertiesFile = file("keystore/debug.keystore.properties")
def keystoreProperties = new Properties()
Expand All @@ -44,6 +54,7 @@ android {
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "app_name", getAppName(BuildType.RELEASE)
Expand Down

0 comments on commit 576748e

Please sign in to comment.