diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h b/packages/react-native-reanimated/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h index 75ec289f6011..3b2645a4640a 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h @@ -1,9 +1,8 @@ #pragma once +#include #include -#include - #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp b/packages/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp index 63af32c7f2b3..c341a556f261 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp +++ b/packages/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp @@ -12,8 +12,7 @@ #include #include #include - -#include +#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp b/packages/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp index 3bfee7b82f0c..263ba72da14e 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp +++ b/packages/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp @@ -1,6 +1,5 @@ #include - -#include +#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/Compat/WorkletsApi.h b/packages/react-native-reanimated/Common/cpp/reanimated/Compat/WorkletsApi.h new file mode 100644 index 000000000000..384abed1b44e --- /dev/null +++ b/packages/react-native-reanimated/Common/cpp/reanimated/Compat/WorkletsApi.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#define EXPECTED_WORKLETS_STABLE_API_VERSION "0.8.0" + +static_assert( + std::string(WORKLETS_STABLE_API_VERSION) == EXPECTED_WORKLETS_STABLE_API_VERSION, + "Incompatible worklets stable API version. Expected " EXPECTED_WORKLETS_STABLE_API_VERSION + ", but got " WORKLETS_STABLE_API_VERSION "."); + +#undef EXPECTED_WORKLETS_STABLE_API_VERSION diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandler.h b/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandler.h index b815e9260004..9faa33d81853 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandler.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandler.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h b/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h index 431b38b8d2bc..186290d51ac9 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h index de6c0ab06911..8d6b8bdcc216 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h @@ -2,10 +2,9 @@ #include #include +#include #include -#include - #include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h index e6990108be76..1faf118d2319 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h @@ -4,9 +4,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h index 12420865bf40..95604fd13638 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h @@ -1,12 +1,11 @@ #pragma once +#include #include #include #include #include -#include - #include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h index bcd0b801fd19..5946b958d53b 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h @@ -5,11 +5,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp index 37a1c483d5e7..477a36e40ac0 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +++ b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -8,7 +9,6 @@ #include #include #include -#include #ifdef __ANDROID__ #include diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h index 1f10f5684030..e68c4c179918 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp index fd6461848fa0..5f4feadf6608 100644 --- a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp +++ b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -7,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h index dc2ff44b6ce3..48501ceb65e2 100644 --- a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h +++ b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/packages/react-native-reanimated/apple/reanimated/apple/ReanimatedModule.mm b/packages/react-native-reanimated/apple/reanimated/apple/ReanimatedModule.mm index 97ff0a31c753..7584babc5652 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/ReanimatedModule.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/ReanimatedModule.mm @@ -3,6 +3,7 @@ #import #import +#import #import #import #import @@ -11,8 +12,6 @@ #import #import -#import - using namespace facebook::react; using namespace reanimated; using namespace worklets; diff --git a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h index e571568081c2..961f5d429da8 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h +++ b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h @@ -1,8 +1,8 @@ #if __cplusplus +#import #import #import -#import namespace reanimated { diff --git a/packages/react-native-worklets/Common/cpp/worklets/Compat/StableApi.h b/packages/react-native-worklets/Common/cpp/worklets/Compat/StableApi.h index bc48e7c7c30f..f19ba476b740 100644 --- a/packages/react-native-worklets/Common/cpp/worklets/Compat/StableApi.h +++ b/packages/react-native-worklets/Common/cpp/worklets/Compat/StableApi.h @@ -1,5 +1,12 @@ #pragma once +/** +* Version of `react-native-worklets` which introduced current stable API. +* It can be used by libraries to verify they use a compatible version +* of `react-native-worklets` installed when integrating in C++. +*/ +#define WORKLETS_STABLE_API_VERSION "0.8.0" + #include #include #include