Skip to content

Commit

Permalink
Template: Specify abiFilters if enableSeparateBuildPerCPUArchitecture…
Browse files Browse the repository at this point in the history
… is not set.

Summary:
As users can toggle `enableSeparateBuildPerCPUArchitecture` to create a split APK, once that is off, the `-PreactNativeArchitecture` is not correctly considered when building the local module.

This will make sure that, if users have `enableSeparateBuildPerCPUArchitecture` set to `false`, their
app is building the local `app_modules` only for the requested architectures.

Practically, users invoking with `--active-arch-only` might experience a build failure if they have a fully clean environment (would be forced to do a full build before using `--active-arch-only`). This addresses this scenario.

Changelog:
[Android] [Fixed] - Template: Specify abiFilters if enableSeparateBuildPerCPUArchitecture is not set.

Reviewed By: ShikaSD

Differential Revision: D35250700

fbshipit-source-id: 4e555888636cf182495fab2b4a562d93a70b9e66
  • Loading branch information
cortinico authored and facebook-github-bot committed Mar 31, 2022
1 parent d05a5d1 commit 5dff920
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions template/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ android {
targets "helloworld_appmodules"
}
}
if (!enableSeparateBuildPerCPUArchitecture) {
ndk {
abiFilters (*reactNativeArchitectures())
}
}
}
}

Expand Down

0 comments on commit 5dff920

Please sign in to comment.