From fe7ab1c50f207eca0fd9228ab9e6e80ac0d7ebf4 Mon Sep 17 00:00:00 2001 From: ppc Date: Mon, 18 Nov 2024 22:00:53 +0000 Subject: [PATCH] prepare android release bundling --- android-signing.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 android-signing.patch diff --git a/android-signing.patch b/android-signing.patch new file mode 100644 index 0000000..c806b19 --- /dev/null +++ b/android-signing.patch @@ -0,0 +1,29 @@ +diff --git a/amnet-native/android/app/build.gradle b/amnet-native/android/app/build.gradle +index 6ee4a34..eb8c5f0 100644 +--- a/amnet-native/android/app/build.gradle ++++ b/amnet-native/android/app/build.gradle +@@ -124,15 +124,21 @@ android { + keyAlias 'androiddebugkey' + keyPassword 'android' + } ++ release { ++ if (project.hasProperty('AMNET_UPLOAD_STORE_FILE')) { ++ storeFile file(AMNET_UPLOAD_STORE_FILE) ++ storePassword AMNET_UPLOAD_STORE_PASSWORD ++ keyAlias AMNET_UPLOAD_KEY_ALIAS ++ keyPassword AMNET_UPLOAD_KEY_PASSWORD ++ } ++ } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + 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 + shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false) + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"