Skip to content

Instantly share code, notes, and snippets.

@shubhamkakkar
Last active February 9, 2021 16:43
Show Gist options
  • Save shubhamkakkar/3c7fa1b98cac163159da638539021a3a to your computer and use it in GitHub Desktop.
Save shubhamkakkar/3c7fa1b98cac163159da638539021a3a to your computer and use it in GitHub Desktop.
version: 2
aliases:
- &restore-yarn-cache
name: Restore cached root node_modules
key: yarn-cache-{{ checksum "yarn.lock" }}
- &save-yarn-cache
name: Save node_modules to cache
key: yarn-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
jobs:
android:
docker:
- image: reactnativecommunity/react-native-android
steps:
- checkout
- restore_cache: *restore-yarn-cache
- run:
name: yarn install
command: yarn install
- save_cache: *save-yarn-cache
- run:
name: env file
command: ENVFILE=.env.development
- run:
name: jetify
command: npx jetify
- run:
name: react bundle
command: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
- run:
name: android build
command: |
cd android
cp keystore.properties.example keystore.properties
chmod +x gradlew && ./gradlew assembleDebug
workflows:
version: 2
build_and_test:
jobs:
- android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment