Skip to content

refactor: restructure worklets source sets #701

refactor: restructure worklets source sets

refactor: restructure worklets source sets #701

name: Example Android build check
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
pull_request:
paths:
- .github/workflows/example-android-build-check.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- apps/fabric-example/package.json
- apps/fabric-example/android/**
merge_group:
branches:
- main
push:
branches:
- main
paths:
- .github/workflows/example-android-build-check.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- apps/fabric-example/package.json
- apps/fabric-example/android/**
workflow_call:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: apps/fabric-example
COMMON_APP_DIR: apps/common-app
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Use external worklets
if: ${{ inputs.use-external-worklets == 'true' }}
working-directory: ${{ env.COMMON_APP_DIR }}
run: yarn add react-native-worklets@workspace:"*"
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a