Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
app: finalize for release
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaax0815 committed Oct 29, 2022
1 parent 4c396b2 commit 3c8c2ca
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import com.android.build.OutputFile

project.ext.react = [
enableHermes: true, // clean and rebuild if changing
hermesCommand: "../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc"
]

apply from: "../../node_modules/react-native/react.gradle"
Expand All @@ -91,12 +92,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.
Expand Down Expand Up @@ -213,7 +214,7 @@ android {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
universalApk true // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
Expand All @@ -224,6 +225,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 {
Expand All @@ -232,7 +241,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"
}
Expand Down

0 comments on commit 3c8c2ca

Please sign in to comment.