react-native-keys
react-native-keys copied to clipboard
fix: Ensure correct ABI filtering in CMake configuration
This commit updates the build.gradle file to dynamically determine ABI filters
based on project requirements. Instead of relying on static ABI configurations,
the reactNativeArchitectures() function is introduced to fetch ABI filters from
project properties or default to a standard set when not specified. This ensures
that only the necessary ABIs are processed during the build, addressing issues
related to incorrect ABI configurations.
Changes include:
- Introduced
reactNativeArchitectures()function to fetch ABI filters dynamically. - Updated
cmakeblock in build.gradle to useabiFilters (*reactNativeArchitectures()).
This resolves issues where CMake attempted to build unnecessary ABIs, improving build efficiency and reliability.
To test this change:
- Ensure your development environment has React Native dependencies installed and configured.
- Run the project build with various Android ABIs (e.g., armeabi-v7a, arm64-v8a, x86, x86_64) using different build configurations (debug and release).
- Verify that the build process completes successfully without attempting to build unsupported architectures and that the correct ABI is selected based on the project's configuration. Pay special attention to scenarios involving
--active-archto ensure correct ABI detection.