From 9cf24b0f29a1ba8a10b034772eee13373d5dc4c8 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Fri, 1 Apr 2022 00:29:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9B=90=ED=83=88=ED=87=B4=20?= =?UTF-8?q?=EB=B0=8F=20android=20=EC=95=A0=ED=94=8C=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=82=AD=EC=A0=9C=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/build.gradle | 21 ++++++++++++++++++--- android/app/proguard-rules.pro | 2 ++ android/gradle.properties | 4 ++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 75c52d2..879b9df 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,12 +91,12 @@ apply from: "../../node_modules/react-native/react.gradle" * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */ -def enableSeparateBuildPerCPUArchitecture = false +def enableSeparateBuildPerCPUArchitecture = true /** * Run Proguard to shrink the Java bytecode in release builds. */ -def enableProguardInReleaseBuilds = false +def enableProguardInReleaseBuilds = true /** * The preferred build flavor of JavaScriptCore. @@ -138,6 +138,13 @@ android { compileSdkVersion rootProject.ext.compileSdkVersion + lintOptions { + checkReleaseBuilds false + // Or, if you prefer, you can continue to check for errors in release builds, + // but continue the build even when errors are found: + abortOnError false + } + defaultConfig { applicationId "com.amattang" minSdkVersion rootProject.ext.minSdkVersion @@ -162,6 +169,14 @@ android { keyAlias 'androiddebugkey' keyPassword 'android' } + release { + if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { + storeFile file(MYAPP_RELEASE_STORE_FILE) + storePassword MYAPP_RELEASE_STORE_PASSWORD + keyAlias MYAPP_RELEASE_KEY_ALIAS + keyPassword MYAPP_RELEASE_KEY_PASSWORD + } + } } buildTypes { debug { @@ -175,7 +190,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/app/proguard-rules.pro b/android/app/proguard-rules.pro index 11b0257..7dab035 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -8,3 +8,5 @@ # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: +-keep class com.facebook.hermes.unicode.** { *; } +-keep class com.facebook.jni.** { *; } diff --git a/android/gradle.properties b/android/gradle.properties index 11d6e02..09c427e 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.99.0 +MYAPP_RELEASE_STORE_FILE=amattang.keystore +MYAPP_RELEASE_KEY_ALIAS=amattang +MYAPP_RELEASE_STORE_PASSWORD=amattang1! +MYAPP_RELEASE_KEY_PASSWORD=amattang1!