-
-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(Android): add autolinking on Fabric #1585
Changes from all commits
d5a9109
4f84579
da0faed
e177bf4
d3b7f73
da63061
7963fd0
882f032
57f3346
d54857f
0ccc2ea
b8ccfa3
1a00f6a
e1d5f3e
ba5252b
de99905
449316f
29bd651
8e011e7
81b86ad
4b56ca7
05de5a5
b573d77
7bd60c4
e2a4909
007895b
c94c6e8
5d4912c
48630ec
2cfe611
8ce7490
0d9f573
213e592
9c00515
3afe846
509f1af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
set(CMAKE_VERBOSE_MAKEFILE ON) | ||
|
||
set(LIB_LITERAL rnscreens) | ||
set(LIB_TARGET_NAME react_codegen_${LIB_LITERAL}) | ||
|
||
set(LIB_ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) | ||
set(LIB_COMMON_DIR ${LIB_ANDROID_DIR}/../common/cpp) | ||
set(LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR}/build/generated/source/codegen/jni) | ||
set(LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR}/react/renderer/components/${LIB_LITERAL}) | ||
|
||
add_compile_options( | ||
-fexceptions | ||
-frtti | ||
-std=c++17 | ||
-Wall | ||
-Wpedantic | ||
-Wno-gnu-zero-variadic-macro-arguments | ||
) | ||
|
||
file(GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR}/react/renderer/components/${LIB_LITERAL}/*.cpp) | ||
file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}/*.cpp) | ||
|
||
add_library( | ||
${LIB_TARGET_NAME} | ||
SHARED | ||
${LIB_CUSTOM_SRCS} | ||
${LIB_CODEGEN_SRCS} | ||
) | ||
|
||
target_include_directories( | ||
${LIB_TARGET_NAME} | ||
PUBLIC | ||
. | ||
${LIB_COMMON_DIR} | ||
${LIB_ANDROID_GENERATED_JNI_DIR} | ||
${LIB_ANDROID_GENERATED_COMPONENTS_DIR} | ||
) | ||
|
||
target_link_libraries( | ||
${LIB_TARGET_NAME} | ||
fbjni | ||
folly_runtime | ||
glog | ||
jsi | ||
react_codegen_rncore | ||
react_debug | ||
react_nativemodule_core | ||
react_render_core | ||
react_render_debug | ||
react_render_graphics | ||
react_render_mapbuffer | ||
rrc_view | ||
turbomodulejsijni | ||
yoga | ||
) | ||
|
||
target_compile_options( | ||
${LIB_TARGET_NAME} | ||
PRIVATE | ||
-DLOG_TAG=\"ReactNative\" | ||
-fexceptions | ||
-frtti | ||
-std=c++17 | ||
-Wall | ||
) | ||
|
||
target_include_directories( | ||
${CMAKE_PROJECT_NAME} | ||
PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
Comment on lines
+68
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required, so when preprocessor expands |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "rnscreens.h" | ||
kkafar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
namespace facebook { | ||
namespace react { | ||
|
||
|
||
std::shared_ptr<TurboModule> rnscreens_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { | ||
return nullptr; | ||
} | ||
|
||
} // namespace react | ||
} // namespace facebook |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <ReactCommon/JavaTurboModule.h> | ||
#include <ReactCommon/TurboModule.h> | ||
#include <jsi/jsi.h> | ||
#include <react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This include directive makes |
||
|
||
namespace facebook { | ||
namespace react { | ||
|
||
JSI_EXPORT | ||
tomekzaw marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to add information why it is needed at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #1585 (comment) |
||
std::shared_ptr<TurboModule> rnscreens_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); | ||
|
||
} // namespace react | ||
} // namespace facebook |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the changes needed in
rnsvg
, maybe it would be good to add a comment that you should add here all libraries that your custom state depend on.