Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/publishReactNativeAndroidArtifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
name: Build and Publish React Native Artifacts
runs-on: ${{ github.repository_owner == 'Expensify' && 'blacksmith-16vcpu-ubuntu-2404' || 'blacksmith-2vcpu-ubuntu-2404' }}
needs: verifyPatches
if: needs.verifyPatches.outputs.build_targets != ''
if: needs.verifyPatches.outputs.build_targets != ''
strategy:
# Disable fail-fast to prevent cancelling both jobs when only one needs to be stopped due to concurrency limits
fail-fast: false
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244

- name: Determine new patched RN version
id: getNewPatchedVersion
run: echo "NEW_PATCHED_VERSION=$(./.github/scripts/getNewPatchedRNVersion.sh)" >> "$GITHUB_OUTPUT"
Expand All @@ -175,14 +175,26 @@ jobs:
echo "Version: ${{ env.PATCHED_VERSION }}"
echo "Patches hash: ${{ env.PATCHES_HASH }}"
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
./gradlew buildReactNativeArtifacts -PpatchedArtifacts.forceBuildFromSource=true -x lint -x test -x check

# Exclude ktfmt and test tasks from the included react-native build
EXCLUDE_TASKS=(
-x :react-native:packages:react-native:ReactAndroid:ktfmtCheck
-x :react-native:packages:react-native:ReactAndroid:ktfmtCheckMain
-x :react-native:packages:react-native:ReactAndroid:ktfmtCheckScripts
-x :react-native:packages:react-native:ReactAndroid:testDebugOptimizedUnitTest
-x :react-native:packages:react-native:ReactAndroid:testDebugUnitTest
-x :react-native:packages:react-native:ReactAndroid:testReleaseUnitTest
)

./gradlew buildReactNativeArtifacts -PpatchedArtifacts.forceBuildFromSource=true -x lint -x test -x check "${EXCLUDE_TASKS[@]}"
./gradlew publishReactNativeArtifacts -PpatchedArtifacts.forceBuildFromSource=true
env:
GH_PUBLISH_ACTOR: ${{ github.actor }}
GH_PUBLISH_TOKEN: ${{ github.token }}
IS_HYBRID_BUILD: ${{ matrix.is_hybrid }}
PATCHED_VERSION: ${{ steps.getNewPatchedVersion.outputs.NEW_PATCHED_VERSION }}
PATCHES_HASH: ${{ matrix.is_hybrid == 'true' && needs.verifyPatches.outputs.hybrid_app_patches_hash || needs.verifyPatches.outputs.standalone_patches_hash }}
CMAKE_VERSION: 3.31.6

- name: Announce failed workflow in Slack
if: ${{ failure() }}
Expand Down
5 changes: 2 additions & 3 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ if(settings.extensions.patchedArtifacts.buildFromSource) {
}
}

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
expoAutolinking {
projectRoot = file(rootDir)
projectRoot = file('../')
searchPaths = ['node_modules']
useExpoModules()
}
Loading