forked from AppAndFlow/react-native-safe-area-context
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support RN 0.70 new arch (AppAndFlow#312)
- Loading branch information
1 parent
fa24e47
commit cecdd61
Showing
51 changed files
with
2,862 additions
and
4,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ local.properties | |
*.iml | ||
android/gradle | ||
android/gradlew* | ||
.cxx | ||
|
||
# BUCK | ||
buck-out/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
android/src/fabric/java/com/th3rdwave/safeareacontext/SafeAreaContextComponentsRegistry.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 safeareacontext) | ||
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_JNI_DIR}/*.cpp ${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} | ||
) |
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
android/src/main/jni/SafeAreaContextComponentsRegistry.cpp
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/safeareacontext/RNCSafeAreaViewComponentDescriptor.h> | ||
|
||
namespace facebook { | ||
namespace react { | ||
|
||
JSI_EXPORT | ||
std::shared_ptr<TurboModule> safeareacontext_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); | ||
|
||
} // namespace react | ||
} // namespace facebook |
Oops, something went wrong.