From 628c16113931885dc3c2befa5d73ca2d57873d9d Mon Sep 17 00:00:00 2001 From: Vivek K J Date: Fri, 27 Aug 2021 16:58:09 +0530 Subject: [PATCH] Add release commands to gradle file --- android/app/build.gradle | 9 +++++++++ android/gradle.properties | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 466af47..f9da16a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -152,6 +152,14 @@ android { keyAlias 'androiddebugkey' keyPassword 'android' } + release { + if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) { + storeFile file(MYAPP_UPLOAD_STORE_FILE) + storePassword MYAPP_UPLOAD_STORE_PASSWORD + keyAlias MYAPP_UPLOAD_KEY_ALIAS + keyPassword MYAPP_UPLOAD_KEY_PASSWORD + } + } } buildTypes { debug { @@ -161,6 +169,7 @@ android { // Caution! In production, you need to generate your own keystore file. // see https://reactnative.dev/docs/signed-apk-android. signingConfig signingConfigs.debug + signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } diff --git a/android/gradle.properties b/android/gradle.properties index d21d03f..3b98b4f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -26,3 +26,7 @@ android.enableJetifier=true # Version of flipper SDK to use with React Native FLIPPER_VERSION=0.75.1 +MYAPP_UPLOAD_STORE_FILE=key-for-android-build.keystore +MYAPP_UPLOAD_KEY_ALIAS=key-for-android +MYAPP_UPLOAD_STORE_PASSWORD=Vivu2004 +MYAPP_UPLOAD_KEY_PASSWORD=Vivu2004 \ No newline at end of file