Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused variable
NODE_MODULES_DIR
from build.gradle
in app …
…template (#34459) Summary: This PR removes unused variable `NODE_MODULES_DIR` passed from `build.gradle` to `CMakeLists.txt` which causes the following CMake warnings to appear in the logs: ``` > Task :app:configureCMakeDebug[arm64-v8a] C/C++: debug|arm64-v8a :CMake Warning: C/C++: debug|arm64-v8a : Manually-specified variables were not used by the project: C/C++: debug|arm64-v8a : NODE_MODULES_DIR ``` First I changed the value of `NODE_MODULES_DIR` to some non-existent path (i.e. `-DNODE_MODULES_DIR=/foo/bar`) to confirm that the variable is indeed unused. Then I completely removed it from `arguments` and the CMake warning disappeared. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Fixed] - Removed unused variable `NODE_MODULES_DIR` from `build.gradle` in app template Pull Request resolved: #34459 Test Plan: 1. Create a new RN 0.70.0-rc.3 app from template with `npx react-native@next init RN070RC3 --version 0.70.0-rc.3` 2. Set `newArchEnabled=true` in `settings.gradle` 3. Open `android` directory in Android Studio 4. Run Gradle Sync 5. Build the app 6. Search for `NODE_MODULES_DIR` in the logs 7. Notice the CMake warning 8. Remove the line from this PR 9. Build the app again 10. Search for `NODE_MODULES_DIR` in the logs 11. Confirm there are no occurrences Reviewed By: neildhar Differential Revision: D38864127 Pulled By: cortinico fbshipit-source-id: b41440edcdba63945e3b08cef897a250686c13ba
- Loading branch information