File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed
Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -88,3 +88,6 @@ modules/react-native-shopify-checkout-kit/android/gradle/wrapper/gradle-wrapper.
8888modules /react-native-shopify-checkout-kit /android /gradle /wrapper /gradle-wrapper.properties
8989modules /react-native-shopify-checkout-kit /android /gradlew
9090modules /react-native-shopify-checkout-kit /android /gradlew.bat
91+
92+ # Sample bundle
93+ ** /index.android.bundle
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ android {
8989 applicationId " com.shopify.checkoutkitreactnative"
9090 minSdkVersion rootProject. ext. minSdkVersion
9191 targetSdkVersion rootProject. ext. targetSdkVersion
92- versionCode 1
92+ versionCode 5
9393 versionName " 1.0"
9494 }
9595 signingConfigs {
@@ -99,15 +99,21 @@ android {
9999 keyAlias ' androiddebugkey'
100100 keyPassword ' android'
101101 }
102+ release {
103+ if (project. hasProperty(' CHECKOUT_KIT_UPLOAD_STORE_FILE' )) {
104+ storeFile file(CHECKOUT_KIT_UPLOAD_STORE_FILE )
105+ storePassword CHECKOUT_KIT_UPLOAD_STORE_PASSWORD
106+ keyAlias CHECKOUT_KIT_UPLOAD_STORE_ALIAS
107+ keyPassword CHECKOUT_KIT_UPLOAD_KEY_PASSWORD
108+ }
109+ }
102110 }
103111 buildTypes {
104112 debug {
105113 signingConfig signingConfigs. debug
106114 }
107115 release {
108- // Caution! In production, you need to generate your own keystore file.
109- // see https://reactnative.dev/docs/signed-apk-android.
110- signingConfig signingConfigs. debug
116+ signingConfig signingConfigs. release
111117 minifyEnabled enableProguardInReleaseBuilds
112118 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
113119 }
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env bash
2+
3+ set -ex
4+
5+ cd sample
6+
7+ mkdir -p android/app/src/main/assets
8+ npx react-native bundle --platform android \
9+ --dev false \
10+ --entry-file index.js \
11+ --bundle-output android/app/src/main/assets/index.android.bundle \
12+
13+ npx react-native build-android --mode=release
14+
15+ echo "Run \"cd sample && npx react-native run-android --variant=release\" to test the release build"
16+ echo "Output bundle location: sample/android/app/build/outputs/bundle/release/app-release.aab"
You can’t perform that action at this time.
0 commit comments