From 576748e584023f72c198282082cb9451aafcc360 Mon Sep 17 00:00:00 2001 From: Ritesh Shakya Date: Sun, 16 Jun 2019 13:08:37 +0545 Subject: [PATCH] - Added config for release build --- student/.gitignore | 5 ++++- student/build.gradle | 11 +++++++++++ teacher/.gitignore | 5 ++++- teacher/build.gradle | 11 +++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/student/.gitignore b/student/.gitignore index 5b05d47..2b3ae18 100644 --- a/student/.gitignore +++ b/student/.gitignore @@ -1,4 +1,7 @@ /build # Google Services (e.g. APIs or Firebase) -google-services.json \ No newline at end of file +google-services.json + +/keystore/release.jks +/keystore/release.keystore.properties \ No newline at end of file diff --git a/student/build.gradle b/student/build.gradle index 38de8e7..5d3b689 100644 --- a/student/build.gradle +++ b/student/build.gradle @@ -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() @@ -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) } diff --git a/teacher/.gitignore b/teacher/.gitignore index 5b05d47..2b3ae18 100644 --- a/teacher/.gitignore +++ b/teacher/.gitignore @@ -1,4 +1,7 @@ /build # Google Services (e.g. APIs or Firebase) -google-services.json \ No newline at end of file +google-services.json + +/keystore/release.jks +/keystore/release.keystore.properties \ No newline at end of file diff --git a/teacher/build.gradle b/teacher/build.gradle index 112e79c..b860f65 100644 --- a/teacher/build.gradle +++ b/teacher/build.gradle @@ -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() @@ -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)