set up signing and a new release test command

This commit is contained in:
austinried 2021-08-23 17:17:13 +09:00
parent cf9789b36c
commit 4b9171539c
2 changed files with 15 additions and 4 deletions

View File

@ -135,7 +135,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionName "1.0.0"
}
splits {
abi {
@ -152,15 +152,25 @@ android {
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty("SUBTRACKS_UPLOAD_STORE_FILE")) {
storeFile file(SUBTRACKS_UPLOAD_STORE_FILE)
storePassword SUBTRACKS_UPLOAD_STORE_PASSWORD
keyAlias SUBTRACKS_UPLOAD_KEY_ALIAS
keyPassword SUBTRACKS_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
if (project.hasProperty("signReleaseWithDebug")) {
signingConfig signingConfigs.debug
} else {
signingConfig signingConfigs.release
}
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}

View File

@ -5,6 +5,7 @@
"license": "GPL-3.0-only",
"scripts": {
"android": "react-native run-android",
"android-release": "./android/gradlew -p android assembleRelease -PsignReleaseWithDebug=true && adb install -r android/app/build/outputs/apk/release/app-release.apk && adb shell am start -n com.subtracks/.MainActivity",
"start": "react-native start",
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"