Skip to content

docs: update usage.md for react-native 0.72 (#2104) #326

docs: update usage.md for react-native 0.72 (#2104)

docs: update usage.md for react-native 0.72 (#2104) #326

name: Test Android build
on:
pull_request:
paths:
- '.github/workflows/android-build-test.yml'
- 'android/**'
- 'src/fabric/**'
- 'package.json'
- 'Example/android/**'
- 'Example/package.json'
- 'FabricExample/android/**'
- 'FabricExample/package.json'
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [Example, FabricExample]
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Accept licenses
run: /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Restore svg node_modules from cache
uses: actions/cache@v2
id: cache-node-modules-svg
with:
path: |
node_modules
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-svg
- name: Install svg node_modules
run: yarn install --frozen-lockfile
- name: Restore app node_modules from cache
uses: actions/cache@v2
id: cache-node-modules-app
with:
path: |
${{ matrix.working-directory }}/node_modules
key: ${{ runner.os }}-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }}
restore-keys: |
${{ runner.os }}-node-modules-${{ matrix.working-directory }}-
- name: Install app node_modules
working-directory: ${{ matrix.working-directory }}
run: yarn install --frozen-lockfile
- name: Restore build from cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
android/build
android/.cxx
${{ matrix.working-directory }}/android/build
${{ matrix.working-directory }}/android/.cxx
${{ matrix.working-directory }}/android/.gradle
${{ matrix.working-directory }}/android/app/build
${{ matrix.working-directory }}/android/app/.cxx
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/build
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/hermes-engine/build
${{ matrix.working-directory }}/node_modules/react-native/ReactAndroid/hermes-engine/.cxx
key: ${{ runner.os }}-build5-${{ matrix.working-directory }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'android/build.gradle', format('{0}/node_modules/react-native/sdks/.hermesversion', matrix.working-directory)) }}
- name: Build app
working-directory: ${{ matrix.working-directory }}/android
run: ./gradlew assembleDebug --build-cache --console=plain -PreactNativeArchitectures=arm64-v8a