From 804d2b5bf1dedef721a0eea55b327b8eac3a4a71 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 24 Nov 2022 08:45:15 -0800 Subject: [PATCH] Allow `reactnativejni` to be consumed via prefab (#35461) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35461 This is another library which is adding prefab support as it's needed by Expo libraries and Reanimated. Changelog: [Internal] [Changed] - Allow `reactnativejni` to be consumed via prefab Reviewed By: cipolleschi Differential Revision: D41520801 fbshipit-source-id: 91142a5b5051cfba478d93a2475a178eed6fbb29 --- ReactAndroid/build.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index e4f28debed1481..041f546c668f6e 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -197,6 +197,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa "react_render_mounting", new Pair("../ReactCommon/react/renderer/mounting/", "react/renderer/mounting/"), ), + new PrefabPreprocessingEntry( + "reactnativejni", + new Pair("src/main/jni/react/jni", "react/jni/"), + ), ] ) it.outputDir.set(prefabHeadersDir) @@ -425,12 +429,12 @@ android { "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-21" - targets "reactnativejni", - "jscexecutor", + targets "jscexecutor", "jsijniprofiler", "reactnativeblob", "reactperfloggerjni", // prefab targets + "reactnativejni", "react_render_debug", "turbomodulejsijni", "runtimeexecutor", @@ -567,6 +571,9 @@ android { react_render_mounting { headers(new File(prefabHeadersDir, "react_render_mounting").absolutePath) } + reactnativejni { + headers(new File(prefabHeadersDir, "reactnativejni").absolutePath) + } "hermes-executor" { headers(new File(prefabHeadersDir, "hermes-executor").absolutePath) }