diff --git a/ReactCommon/react/renderer/attributedstring/BUCK b/ReactCommon/react/renderer/attributedstring/BUCK index 971f983506eb98..9ab399565e0078 100644 --- a/ReactCommon/react/renderer/attributedstring/BUCK +++ b/ReactCommon/react/renderer/attributedstring/BUCK @@ -55,7 +55,7 @@ rn_xplat_cxx_library( "//xplat/folly:headers_only", "//xplat/folly:memory", "//xplat/folly:molly", - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/debug:debug"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/graphics:graphics"), diff --git a/ReactCommon/react/renderer/componentregistry/BUCK b/ReactCommon/react/renderer/componentregistry/BUCK index 25316447438e65..7fa21e963dda4a 100644 --- a/ReactCommon/react/renderer/componentregistry/BUCK +++ b/ReactCommon/react/renderer/componentregistry/BUCK @@ -57,6 +57,6 @@ rn_xplat_cxx_library( "//xplat/jsi:jsi", react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/components/text/BUCK b/ReactCommon/react/renderer/components/text/BUCK index f8a47669a4ce09..3908799bc93d47 100644 --- a/ReactCommon/react/renderer/components/text/BUCK +++ b/ReactCommon/react/renderer/components/text/BUCK @@ -61,7 +61,7 @@ rn_xplat_cxx_library( "//xplat/folly:memory", "//xplat/folly:molly", YOGA_CXX_TARGET, - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/attributedstring:attributedstring"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), diff --git a/ReactCommon/react/renderer/components/textinput/BUCK b/ReactCommon/react/renderer/components/textinput/BUCK index c495d90365ee01..6a09a1034da875 100644 --- a/ReactCommon/react/renderer/components/textinput/BUCK +++ b/ReactCommon/react/renderer/components/textinput/BUCK @@ -58,7 +58,7 @@ rn_xplat_cxx_library( "//xplat/folly:memory", "//xplat/folly:molly", YOGA_CXX_TARGET, - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/attributedstring:attributedstring"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), diff --git a/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK b/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK index 058e8b60db4948..1f7e87f1340921 100644 --- a/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK +++ b/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK @@ -58,7 +58,7 @@ rn_xplat_cxx_library( "//xplat/folly:memory", "//xplat/folly:molly", YOGA_CXX_TARGET, - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/attributedstring:attributedstring"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), diff --git a/ReactCommon/react/renderer/core/BUCK b/ReactCommon/react/renderer/core/BUCK index 32d4cec2d83bbe..13fa6dd9f1daea 100644 --- a/ReactCommon/react/renderer/core/BUCK +++ b/ReactCommon/react/renderer/core/BUCK @@ -58,7 +58,7 @@ rn_xplat_cxx_library( "//xplat/folly:molly", "//xplat/jsi:JSIDynamic", "//xplat/jsi:jsi", - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/debug:debug"), react_native_xplat_target("react/renderer/graphics:graphics"), ], @@ -105,7 +105,7 @@ fb_xplat_cxx_binary( visibility = ["PUBLIC"], deps = [ "//xplat/third-party/benchmark:benchmark", - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/components/view:view"), ":core", ], diff --git a/ReactCommon/react/renderer/element/BUCK b/ReactCommon/react/renderer/element/BUCK index 23db67759aed23..9e91df1e3c358b 100644 --- a/ReactCommon/react/renderer/element/BUCK +++ b/ReactCommon/react/renderer/element/BUCK @@ -60,7 +60,7 @@ rn_xplat_cxx_library( react_native_xplat_target("react/renderer/componentregistry:componentregistry"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/mapbuffer/BUCK b/ReactCommon/react/renderer/mapbuffer/BUCK index fd968ba4362693..5bd4038921efe8 100644 --- a/ReactCommon/react/renderer/mapbuffer/BUCK +++ b/ReactCommon/react/renderer/mapbuffer/BUCK @@ -44,7 +44,7 @@ rn_xplat_cxx_library( "//xplat/fbsystrace:fbsystrace", "//xplat/folly:headers_only", "//xplat/folly:memory", - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/mounting/BUCK b/ReactCommon/react/renderer/mounting/BUCK index f84c9bc4c084e7..fcc289124b8eaa 100644 --- a/ReactCommon/react/renderer/mounting/BUCK +++ b/ReactCommon/react/renderer/mounting/BUCK @@ -61,7 +61,7 @@ rn_xplat_cxx_library( react_native_xplat_target("react/renderer/components/view:view"), react_native_xplat_target("react/renderer/core:core"), react_native_xplat_target("react/renderer/debug:debug"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/scheduler/BUCK b/ReactCommon/react/renderer/scheduler/BUCK index 915a5e64e9c966..8c525383da0616 100644 --- a/ReactCommon/react/renderer/scheduler/BUCK +++ b/ReactCommon/react/renderer/scheduler/BUCK @@ -63,6 +63,6 @@ rn_xplat_cxx_library( react_native_xplat_target("react/renderer/componentregistry:componentregistry"), react_native_xplat_target("react/renderer/debug:debug"), react_native_xplat_target("react/renderer/components/root:root"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/templateprocessor/BUCK b/ReactCommon/react/renderer/templateprocessor/BUCK index 4cd1046e91311f..a382c5ab5361af 100644 --- a/ReactCommon/react/renderer/templateprocessor/BUCK +++ b/ReactCommon/react/renderer/templateprocessor/BUCK @@ -62,7 +62,7 @@ rn_xplat_cxx_library( react_native_xplat_target("react/renderer/componentregistry:componentregistry"), react_native_xplat_target("react/renderer/debug:debug"), react_native_xplat_target("react/config:config"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), ], ) diff --git a/ReactCommon/react/renderer/textlayoutmanager/BUCK b/ReactCommon/react/renderer/textlayoutmanager/BUCK index 747d108e18ee66..3d8d3358d6abe3 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/BUCK +++ b/ReactCommon/react/renderer/textlayoutmanager/BUCK @@ -125,7 +125,7 @@ rn_xplat_cxx_library( YOGA_CXX_TARGET, react_native_xplat_target("react/renderer/attributedstring:attributedstring"), react_native_xplat_target("react/renderer/core:core"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("react/utils:utils"), react_native_xplat_target("react/renderer/debug:debug"), react_native_xplat_target("react/renderer/graphics:graphics"), react_native_xplat_target("react/renderer/uimanager:uimanager"), diff --git a/ReactCommon/utils/.clang-tidy b/ReactCommon/react/utils/.clang-tidy similarity index 100% rename from ReactCommon/utils/.clang-tidy rename to ReactCommon/react/utils/.clang-tidy diff --git a/ReactCommon/react/utils/Android.mk b/ReactCommon/react/utils/Android.mk new file mode 100644 index 00000000000000..702405ae16d9b5 --- /dev/null +++ b/ReactCommon/react/utils/Android.mk @@ -0,0 +1,25 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := reactutils + +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) + +LOCAL_C_INCLUDES := $(LOCAL_PATH) +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../ + +LOCAL_CFLAGS := \ + -DLOG_TAG=\"Fabric\" + +LOCAL_CFLAGS += -fexceptions -frtti -std=c++14 -Wall + +LOCAL_STATIC_LIBRARIES := +LOCAL_SHARED_LIBRARIES := + +include $(BUILD_SHARED_LIBRARY) diff --git a/ReactCommon/utils/BUCK b/ReactCommon/react/utils/BUCK similarity index 100% rename from ReactCommon/utils/BUCK rename to ReactCommon/react/utils/BUCK diff --git a/ReactCommon/utils/CalledOnceMovableOnlyFunction.h b/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h similarity index 100% rename from ReactCommon/utils/CalledOnceMovableOnlyFunction.h rename to ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h diff --git a/ReactCommon/utils/ContextContainer.h b/ReactCommon/react/utils/ContextContainer.h similarity index 100% rename from ReactCommon/utils/ContextContainer.h rename to ReactCommon/react/utils/ContextContainer.h diff --git a/ReactCommon/utils/FloatComparison.h b/ReactCommon/react/utils/FloatComparison.h similarity index 100% rename from ReactCommon/utils/FloatComparison.h rename to ReactCommon/react/utils/FloatComparison.h diff --git a/ReactCommon/utils/ManagedObjectWrapper.h b/ReactCommon/react/utils/ManagedObjectWrapper.h similarity index 100% rename from ReactCommon/utils/ManagedObjectWrapper.h rename to ReactCommon/react/utils/ManagedObjectWrapper.h diff --git a/ReactCommon/utils/ManagedObjectWrapper.mm b/ReactCommon/react/utils/ManagedObjectWrapper.mm similarity index 100% rename from ReactCommon/utils/ManagedObjectWrapper.mm rename to ReactCommon/react/utils/ManagedObjectWrapper.mm diff --git a/ReactCommon/utils/RunLoopObserver.cpp b/ReactCommon/react/utils/RunLoopObserver.cpp similarity index 100% rename from ReactCommon/utils/RunLoopObserver.cpp rename to ReactCommon/react/utils/RunLoopObserver.cpp diff --git a/ReactCommon/utils/RunLoopObserver.h b/ReactCommon/react/utils/RunLoopObserver.h similarity index 100% rename from ReactCommon/utils/RunLoopObserver.h rename to ReactCommon/react/utils/RunLoopObserver.h diff --git a/ReactCommon/utils/SharedFunction.h b/ReactCommon/react/utils/SharedFunction.h similarity index 100% rename from ReactCommon/utils/SharedFunction.h rename to ReactCommon/react/utils/SharedFunction.h diff --git a/ReactCommon/utils/SimpleThreadSafeCache.h b/ReactCommon/react/utils/SimpleThreadSafeCache.h similarity index 100% rename from ReactCommon/utils/SimpleThreadSafeCache.h rename to ReactCommon/react/utils/SimpleThreadSafeCache.h diff --git a/ReactCommon/utils/Telemetry.h b/ReactCommon/react/utils/Telemetry.h similarity index 100% rename from ReactCommon/utils/Telemetry.h rename to ReactCommon/react/utils/Telemetry.h diff --git a/ReactCommon/utils/ThreadStorage.h b/ReactCommon/react/utils/ThreadStorage.h similarity index 100% rename from ReactCommon/utils/ThreadStorage.h rename to ReactCommon/react/utils/ThreadStorage.h