diff --git a/android/app/build.gradle b/android/app/build.gradle index 61fbab9..af75094 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -217,6 +217,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 { @@ -225,7 +233,7 @@ android { release { // 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 fa4feae..ce29179 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -38,3 +38,10 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # to write custom TurboModules/Fabric components OR use libraries that # are providing them. newArchEnabled=false + + +MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore +MYAPP_UPLOAD_KEY_ALIAS=my-key-alias +#TODO: replace with real keystore password +MYAPP_UPLOAD_STORE_PASSWORD=***** +MYAPP_UPLOAD_KEY_PASSWORD=***** \ No newline at end of file