forked from cerc-io/laconic-wallet
Add script to create APK
This commit is contained in:
parent
4827fa8c7c
commit
bad28be958
31
scripts/build-apk.sh
Executable file
31
scripts/build-apk.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Default value for IS_RELEASE
|
||||
IS_RELEASE=${IS_RELEASE:-false}
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing dependencies..."
|
||||
yarn
|
||||
|
||||
# Create the necessary directory for assets
|
||||
mkdir -p android/app/src/main/assets/
|
||||
|
||||
# Bundle the React Native application
|
||||
yarn react-native bundle \
|
||||
--platform android \
|
||||
--dev false \
|
||||
--entry-file index.js \
|
||||
--bundle-output android/app/src/main/assets/index.android.bundle \
|
||||
--assets-dest android/app/src/main/res
|
||||
|
||||
# Navigate to the android directory
|
||||
cd android
|
||||
|
||||
# Run the Gradle build based on the IS_RELEASE flag
|
||||
if [ "$IS_RELEASE" = "true" ]; then
|
||||
echo "Building release version..."
|
||||
./gradlew assembleRelease
|
||||
else
|
||||
echo "Building debug version..."
|
||||
./gradlew assembleDebug
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user