From f8d7e0a968ea12606fd8cce03470fd374f732aad Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 7 Apr 2022 03:12:29 -0700 Subject: [PATCH] Specify a NODE_MODULES_DIR inside the NDK config for the Android template Summary: I'm just adding a macro passing the NODE_MODULES_DIR to the NDK build. This will make easier to import external libraries for our users. Changelog: [Internal] [Changed] - Specify a NODE_MODULES_DIR inside the NDK config for the Android template Reviewed By: cipolleschi Differential Revision: D35451821 fbshipit-source-id: 5d79359a1610f2de4ec2d50a78b4c930458185d8 --- template/android/app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/android/app/build.gradle b/template/android/app/build.gradle index 5e68d78dd84..3081a1f27f8 100644 --- a/template/android/app/build.gradle +++ b/template/android/app/build.gradle @@ -151,7 +151,8 @@ android { "GENERATED_SRC_DIR=$buildDir/generated/source", "PROJECT_BUILD_DIR=$buildDir", "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", - "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build" + "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", + "NODE_MODULES_DIR=$rootDir/../node_modules" cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1" cppFlags "-std=c++17" // Make sure this target name is the same you specify inside the