From 77ba82a6e1ad5e5fd656aeffbac52057318bae58 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Wed, 20 Nov 2019 23:02:35 -0800 Subject: [PATCH] Fix yogajni build with gradle (#27275) Summary: https://github.com/facebook/react-native/commit/4a69b3e636c479f39a997aec37f716afb3ab6150 changed the way the cpp files for yogajni are included but it doesn't work. I looked at other places where we are using `wildcard` and we need to add `LOCAL_PATH` otherwise the base path will be where this file is included initially, in this case the `react/jni` folder. This causes no cpp files to be included and the jni bindings are not initialized. ## Changelog [Internal] [Fixed] - Fix yogajni build with gradle Pull Request resolved: https://github.com/facebook/react-native/pull/27275 Test Plan: Tested that it builds properly and doesn't crash because of missing native implementation. Differential Revision: D18633950 Pulled By: mdvacca fbshipit-source-id: e229fffb53bc335d441060da3c5d4fd840a3c5b0 --- ReactAndroid/src/main/jni/first-party/yogajni/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk b/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk index 007b2e0237f..91364d36953 100644 --- a/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk @@ -9,7 +9,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := yoga -LOCAL_SRC_FILES := $(wildcard jni/*.cpp) +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jni/*.cpp) LOCAL_C_INCLUDES := $(LOCAL_PATH)/jni