mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Do not store .cpp/.h files inside src/main/java - turbomodule - take 2
Summary: Currently we expose native code (.h, .cpp) inside the src/main/java folder. This is making impossible for users on New Architecture to open the project inside Android Studio. The problem is that the src/main/java is reserved to Java/Kotlin sources only. AGP 7.2 also removed support for mixed source roots: https://developer.android.com/studio/releases/gradle-plugin#duplicate-content-roots This is essentially forcing users to write Java code without any autocompletion as all the React Native Java classes are considered C++ files. I'm addressing this issue folder by folder by moving them from ReactAndroid/src/main/java/com/facebook/... to ReactAndroid/src/main/jni/react/... This is the diff for turbomodule I've also updated all the internal usages and references to the new path. Changelog: [Internal] [Changed] - Do not store .cpp/.h files inside src/main/java - turbomodule Reviewed By: cipolleschi Differential Revision: D38820638 fbshipit-source-id: febb3f8cef18b30e82c3a4776baa85d0c0d19e4b
This commit is contained in:
1 parent
33bd2f6eae
commit
ba2dae3318
14 files changed
+4
-4
No files matched your search
@@ -111,7 +111,7 @@ set_target_properties(turbomodulejsijni
|
||||
${REACT_NDK_EXPORT_DIR}/${ANDROID_ABI}/libturbomodulejsijni.so)
|
||||
target_include_directories(turbomodulejsijni
|
||||
INTERFACE
|
||||
${REACT_ANDROID_SRC_DIR}/java/com/facebook/react/turbomodule/core/jni)
|
||||
${REACT_ANDROID_SRC_DIR}/jni/react/turbomodule)
|
||||
|
||||
## react_render_core
|
||||
add_library(react_render_core SHARED IMPORTED GLOBAL)
|
||||
|
||||
@@ -28,12 +28,12 @@ rn_android_library(
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
react_native_target("java/com/facebook/react/common:common"),
|
||||
react_native_target("java/com/facebook/react/reactperflogger:reactperflogger"),
|
||||
react_native_target("java/com/facebook/react/turbomodule/core/jni:jni"),
|
||||
react_native_target("java/com/facebook/debug/holder:holder"),
|
||||
react_native_target("java/com/facebook/react/bridge:interfaces"),
|
||||
react_native_target("java/com/facebook/react/bridge:bridge"),
|
||||
react_native_target("java/com/facebook/react/config:config"),
|
||||
react_native_target("java/com/facebook/react/module/model:model"),
|
||||
react_native_target("jni/react/turbomodule:jni"),
|
||||
":callinvokerholder",
|
||||
],
|
||||
exported_deps = [
|
||||
|
||||
@@ -96,7 +96,7 @@ add_react_android_subdir(src/main/jni/first-party/yogajni)
|
||||
add_react_android_subdir(src/main/jni/react/jni)
|
||||
add_react_android_subdir(src/main/jni/react/reactperflogger)
|
||||
add_react_android_subdir(src/main/jni/react/jscexecutor)
|
||||
add_react_android_subdir(src/main/java/com/facebook/react/turbomodule/core/jni)
|
||||
add_react_android_subdir(src/main/jni/react/turbomodule)
|
||||
add_react_android_subdir(src/main/jni/react/uimanager)
|
||||
add_react_android_subdir(src/main/jni/react/mapbuffer)
|
||||
add_react_android_subdir(src/main/jni/react/reactnativeblob)
|
||||
|
||||
@@ -62,7 +62,7 @@ rn_xplat_cxx_library(
|
||||
"//xplat/folly:json",
|
||||
"//fbandroid/xplat/fbgloginit:fbgloginit",
|
||||
"//xplat/fbsystrace:fbsystrace",
|
||||
react_native_target("java/com/facebook/react/turbomodule/core/jni:callinvokerholder"),
|
||||
react_native_target("jni/react/turbomodule:callinvokerholder"),
|
||||
react_native_xplat_target("cxxreact:bridge"),
|
||||
react_native_xplat_target("cxxreact:jsbigstring"),
|
||||
react_native_xplat_target("cxxreact:module"),
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user