1
0
mirror of synced 2025-02-17 10:38:32 +01:00

chore: signing config

This commit is contained in:
Juchan Roh 2023-02-04 23:14:16 +09:00
parent 72058b3ecf
commit 1692494320
2 changed files with 20 additions and 12 deletions

4
.gitignore vendored
View File

@ -61,3 +61,7 @@ yarn-error.log
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# android keystore credentials
android/keystore.properties

View File

@ -1,6 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
import com.android.build.OutputFile
@ -88,6 +87,13 @@ def reactNativeArchitectures() {
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
/**
* Signing credentials load
*/
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
@ -111,16 +117,16 @@ android {
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword ''
keyAlias ''
keyPassword ''
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
release {
storeFile file('key.keystore')
storePassword ''
keyAlias ''
keyPassword ''
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
buildTypes {
@ -128,9 +134,7 @@ android {
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
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}