expo-modules-core 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/ExpoModulesCore.podspec +1 -8
- package/android/CMakeLists.txt +0 -9
- package/android/ExpoModulesCorePlugin.gradle +51 -189
- package/android/build.gradle +45 -120
- package/android/src/main/cpp/ExpoModulesHostObject.cpp +0 -1
- package/android/src/main/cpp/JSIInteropModuleRegistry.cpp +6 -20
- package/android/src/main/cpp/JSIInteropModuleRegistry.h +1 -9
- package/android/src/main/cpp/JavaScriptRuntime.cpp +3 -29
- package/android/src/main/cpp/JavaScriptRuntime.h +6 -11
- package/android/src/main/cpp/MethodMetadata.cpp +4 -5
- package/android/src/main/cpp/types/CppType.h +2 -1
- package/android/src/main/cpp/types/FrontendConverter.cpp +73 -0
- package/android/src/main/cpp/types/FrontendConverter.h +20 -0
- package/android/src/main/cpp/types/FrontendConverterProvider.cpp +1 -10
- package/android/src/main/cpp/types/JNIToJSIConverter.cpp +9 -1
- package/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt +3 -20
- package/android/src/main/java/expo/modules/kotlin/AppContext.kt +1 -2
- package/android/src/main/java/expo/modules/kotlin/ModuleHolder.kt +24 -20
- package/android/src/main/java/expo/modules/kotlin/ModuleRegistry.kt +15 -14
- package/android/src/main/java/expo/modules/kotlin/defaultmodules/CoreModule.kt +10 -0
- package/android/src/main/java/expo/modules/kotlin/exception/CommonExceptions.kt +12 -5
- package/android/src/main/java/expo/modules/kotlin/jni/CppType.kt +2 -1
- package/android/src/main/java/expo/modules/kotlin/jni/ExpectedType.kt +0 -9
- package/android/src/main/java/expo/modules/kotlin/jni/JSIInteropModuleRegistry.kt +1 -3
- package/android/src/main/java/expo/modules/kotlin/jni/JavaScriptModuleObject.kt +20 -13
- package/android/src/main/java/expo/modules/kotlin/tracing/ExpoTrace.kt +46 -2
- package/android/src/main/java/expo/modules/kotlin/typedarray/ConcreteTypedArrays.kt +26 -22
- package/android/src/main/java/expo/modules/kotlin/types/AnyTypeConverter.kt +4 -3
- package/android/src/main/java/expo/modules/kotlin/types/Either.kt +84 -26
- package/android/src/main/java/expo/modules/kotlin/types/EitherTypeConverter.kt +102 -67
- package/android/src/main/java/expo/modules/kotlin/types/EnumTypeConverter.kt +9 -12
- package/android/src/main/java/expo/modules/kotlin/types/JSTypeConverter.kt +3 -1
- package/android/src/main/java/expo/modules/kotlin/types/MapTypeConverter.kt +1 -2
- package/android/src/main/java/expo/modules/kotlin/types/SetTypeConverter.kt +67 -0
- package/android/src/main/java/expo/modules/kotlin/types/TypeConverter.kt +2 -1
- package/android/src/main/java/expo/modules/kotlin/types/TypeConverterProvider.kt +17 -17
- package/android/src/main/java/expo/modules/kotlin/uuidv5/Exceptions.kt +6 -0
- package/android/src/main/java/expo/modules/kotlin/uuidv5/Uuidv5.kt +28 -0
- package/android/src/main/java/expo/modules/kotlin/viewevent/ViewEvent.kt +22 -5
- package/android/src/main/java/expo/modules/kotlin/viewevent/ViewEventDelegate.kt +3 -11
- package/android/src/main/java/expo/modules/kotlin/views/ViewDefinitionBuilder.kt +19 -23
- package/android/src/main/java/expo/modules/kotlin/views/ViewManagerWrapperDelegate.kt +0 -36
- package/android-annotation/build.gradle +6 -6
- package/android-annotation-processor/build.gradle +6 -6
- package/build/NativeViewManagerAdapter.d.ts +3 -0
- package/build/NativeViewManagerAdapter.d.ts.map +1 -1
- package/build/NativeViewManagerAdapter.js +3 -0
- package/build/NativeViewManagerAdapter.js.map +1 -1
- package/build/NativeViewManagerAdapter.native.js +1 -1
- package/build/NativeViewManagerAdapter.native.js.map +1 -1
- package/build/requireNativeModule.d.ts +1 -0
- package/build/requireNativeModule.d.ts.map +1 -1
- package/build/requireNativeModule.js +20 -0
- package/build/requireNativeModule.js.map +1 -1
- package/build/requireNativeModule.web.d.ts +3 -0
- package/build/requireNativeModule.web.d.ts.map +1 -0
- package/build/requireNativeModule.web.js +7 -0
- package/build/requireNativeModule.web.js.map +1 -0
- package/build/uuid/uuid.d.ts.map +1 -1
- package/build/uuid/uuid.js +16 -3
- package/build/uuid/uuid.js.map +1 -1
- package/build/uuid/uuid.types.d.ts +11 -1
- package/build/uuid/uuid.types.d.ts.map +1 -1
- package/build/uuid/uuid.types.js +11 -1
- package/build/uuid/uuid.types.js.map +1 -1
- package/build/uuid/uuid.web.d.ts.map +1 -1
- package/build/uuid/uuid.web.js +2 -0
- package/build/uuid/uuid.web.js.map +1 -1
- package/expo-module.config.json +0 -1
- package/ios/{Swift/AppContext.swift → AppContext.swift} +7 -2
- package/ios/AppDelegates/EXAppDelegateWrapper.mm +2 -22
- package/ios/{Swift/Arguments → Arguments}/AnyArgument.swift +1 -0
- package/ios/{Swift/Classes → Classes}/ClassComponentElement.swift +4 -0
- package/ios/{Swift/Conversions.swift → Conversions.swift} +11 -1
- package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicSharedObjectType.swift +4 -3
- package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicViewType.swift +7 -4
- package/ios/{Swift/ExpoBridgeModule.m → ExpoBridgeModule.m} +2 -0
- package/ios/{Swift/ExpoBridgeModule.swift → ExpoBridgeModule.swift} +17 -1
- package/ios/{Swift/Functions → Functions}/ConcurrentFunctionDefinition.swift +15 -6
- package/ios/{Swift/ModuleRegistry.swift → ModuleRegistry.swift} +16 -5
- package/ios/{Swift/Modules → Modules}/CoreModule.swift +8 -0
- package/ios/ReactDelegates/EXReactCompatibleHelpers.h +1 -3
- package/ios/ReactDelegates/EXReactCompatibleHelpers.m +4 -4
- package/ios/{Swift/SharedObjects → SharedObjects}/SharedObjectRegistry.swift +0 -1
- package/ios/Tests/FunctionSpec.swift +8 -0
- package/ios/Tests/ModuleRegistrySpec.swift +21 -0
- package/ios/Tests/SharedObjectRegistrySpec.swift +0 -6
- package/ios/Uuidv5/Exceptions.swift +7 -0
- package/ios/Uuidv5/Uuidv5.swift +32 -0
- package/package.json +5 -2
- package/src/NativeViewManagerAdapter.tsx +3 -0
- package/src/requireNativeModule.ts +23 -0
- package/src/requireNativeModule.web.ts +7 -0
- package/src/uuid/uuid.ts +21 -4
- package/src/uuid/uuid.types.ts +13 -6
- package/src/uuid/uuid.web.ts +3 -1
- package/android/legacy/CMakeLists.txt +0 -196
- package/android/legacy/fabric/Android-prebuilt.cmake +0 -233
- package/android/legacy/fabric/CMakeLists.txt +0 -40
- package/android/src/reactnative/expo/modules/kotlin/ReactNativeCompatibleHelper.kt +0 -12
- package/android/src/reactnative72/expo/modules/kotlin/ReactNativeCompatibleHelper.kt +0 -12
- package/build/uuid/v5.d.ts +0 -11
- package/build/uuid/v5.d.ts.map +0 -1
- package/build/uuid/v5.js +0 -7
- package/build/uuid/v5.js.map +0 -1
- package/ios/EXErrorCodes.h +0 -5
- package/ios/EXErrorCodes.m +0 -5
- package/src/uuid/v5.ts +0 -7
- package/unimodule.json +0 -4
- /package/ios/{Swift/AppContextConfig.swift → AppContextConfig.swift} +0 -0
- /package/ios/{Swift/Arguments → Arguments}/Convertible.swift +0 -0
- /package/ios/{Swift/Arguments → Arguments}/Convertibles.swift +0 -0
- /package/ios/{Swift/Arguments → Arguments}/Enumerable.swift +0 -0
- /package/ios/{Swift/Classes → Classes}/ClassComponent.swift +0 -0
- /package/ios/{Swift/Classes → Classes}/ClassComponentElementsBuilder.swift +0 -0
- /package/ios/{Swift/Classes → Classes}/ClassComponentFactories.swift +0 -0
- /package/ios/{Swift/Classes → Classes}/ClassRegistry.swift +0 -0
- /package/ios/{Swift/Convertibles → Convertibles}/Convertibles+Color.swift +0 -0
- /package/ios/{Swift/Convertibles → Convertibles}/Either.swift +0 -0
- /package/ios/{Swift/DevTools → DevTools}/CdpNetworkTypes.swift +0 -0
- /package/ios/{Swift/DevTools → DevTools}/ExpoRequestCdpInterceptor.swift +0 -0
- /package/ios/{Swift/DevTools → DevTools}/ExpoRequestInterceptorProtocol.swift +0 -0
- /package/ios/{Swift/DevTools → DevTools}/URLRequest+httpBodyData.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/AnyDynamicType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicArrayType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicConvertibleType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicEnumType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicJavaScriptType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicOptionalType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicRawType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicType.swift +0 -0
- /package/ios/{Swift/DynamicTypes → DynamicTypes}/DynamicTypedArrayType.swift +0 -0
- /package/ios/{Swift/EventListener.swift → EventListener.swift} +0 -0
- /package/ios/{Swift/Events → Events}/Callback.swift +0 -0
- /package/ios/{Swift/Events → Events}/EventDispatcher.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/ChainableException.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/CodedError.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/CommonExceptions.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/Exception.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/ExceptionOrigin.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/GenericException.swift +0 -0
- /package/ios/{Swift/Exceptions → Exceptions}/UnexpectedException.swift +0 -0
- /package/ios/{Swift/ExpoRuntime.swift → ExpoRuntime.swift} +0 -0
- /package/ios/{Swift/Functions → Functions}/AnyFunction.swift +0 -0
- /package/ios/{Swift/Functions → Functions}/AsyncFunctionComponent.swift +0 -0
- /package/ios/{Swift/Functions → Functions}/SyncFunctionComponent.swift +0 -0
- /package/ios/{Swift/JavaScriptFunction.swift → JavaScriptFunction.swift} +0 -0
- /package/ios/{Swift/JavaScriptUtils.swift → JavaScriptUtils.swift} +0 -0
- /package/ios/{EXBridgeModule.h → Legacy/EXBridgeModule.h} +0 -0
- /package/ios/{EXExportedModule.h → Legacy/EXExportedModule.h} +0 -0
- /package/ios/{EXExportedModule.m → Legacy/EXExportedModule.m} +0 -0
- /package/ios/{EXSingletonModule.h → Legacy/EXSingletonModule.h} +0 -0
- /package/ios/{EXSingletonModule.m → Legacy/EXSingletonModule.m} +0 -0
- /package/ios/{EXUnimodulesCompat.h → Legacy/EXUnimodulesCompat.h} +0 -0
- /package/ios/{EXUtilities.h → Legacy/EXUtilities.h} +0 -0
- /package/ios/{EXUtilities.m → Legacy/EXUtilities.m} +0 -0
- /package/ios/{ModuleRegistry → Legacy/ModuleRegistry}/EXModuleRegistry.h +0 -0
- /package/ios/{ModuleRegistry → Legacy/ModuleRegistry}/EXModuleRegistry.m +0 -0
- /package/ios/{ModuleRegistry → Legacy/ModuleRegistry}/EXModuleRegistryDelegate.h +0 -0
- /package/ios/{ModuleRegistryAdapter → Legacy/ModuleRegistryAdapter}/EXModuleRegistryAdapter.h +0 -0
- /package/ios/{ModuleRegistryAdapter → Legacy/ModuleRegistryAdapter}/EXModuleRegistryAdapter.m +0 -0
- /package/ios/{ModuleRegistryAdapter → Legacy/ModuleRegistryAdapter}/EXModuleRegistryHolderReactModule.h +0 -0
- /package/ios/{ModuleRegistryAdapter → Legacy/ModuleRegistryAdapter}/EXModuleRegistryHolderReactModule.m +0 -0
- /package/ios/{ModuleRegistryProvider → Legacy/ModuleRegistryProvider}/EXModuleRegistryProvider.h +0 -0
- /package/ios/{ModuleRegistryProvider → Legacy/ModuleRegistryProvider}/EXModuleRegistryProvider.m +0 -0
- /package/ios/{NativeModulesProxy → Legacy/NativeModulesProxy}/EXNativeModulesProxy.h +0 -0
- /package/ios/{NativeModulesProxy → Legacy/NativeModulesProxy}/EXNativeModulesProxy.mm +0 -0
- /package/ios/{NativeModulesProxy → Legacy/NativeModulesProxy}/NativeModulesProxyModule.swift +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXAppLifecycleListener.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXAppLifecycleService.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXEventEmitter.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXEventEmitterService.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXInternalModule.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXJavaScriptContextProvider.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXKernelService.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXLogHandler.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXModuleRegistryConsumer.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXUIManager.h +0 -0
- /package/ios/{Protocols → Legacy/Protocols}/EXUtilitiesInterface.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXLogManager.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXLogManager.m +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactFontManager.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactFontManager.m +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactLogHandler.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactLogHandler.m +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactNativeAdapter.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactNativeAdapter.mm +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactNativeEventEmitter.h +0 -0
- /package/ios/{Services → Legacy/Services}/EXReactNativeEventEmitter.m +0 -0
- /package/ios/{Services → Legacy/Services}/Permissions/EXPermissionsService.h +0 -0
- /package/ios/{Services → Legacy/Services}/Permissions/EXPermissionsService.m +0 -0
- /package/ios/{Services → Legacy/Services}/Permissions/EXReactNativeUserNotificationCenterProxy.h +0 -0
- /package/ios/{Services → Legacy/Services}/Permissions/EXReactNativeUserNotificationCenterProxy.m +0 -0
- /package/ios/{Swift/Logging → Logging}/LogHandlers.swift +0 -0
- /package/ios/{Swift/Logging → Logging}/LogType.swift +0 -0
- /package/ios/{Swift/Logging → Logging}/Logger.swift +0 -0
- /package/ios/{Swift/Logging → Logging}/PersistentFileLog.swift +0 -0
- /package/ios/{Swift/ModuleHolder.swift → ModuleHolder.swift} +0 -0
- /package/ios/{Swift/Modules → Modules}/AnyModule.swift +0 -0
- /package/ios/{Swift/Modules → Modules}/Module.swift +0 -0
- /package/ios/{Swift/Modules → Modules}/ModuleDefinition.swift +0 -0
- /package/ios/{Swift/Modules → Modules}/ModuleDefinitionBuilder.swift +0 -0
- /package/ios/{Swift/Modules → Modules}/ModuleDefinitionComponents.swift +0 -0
- /package/ios/{Swift/ModulesProvider.swift → ModulesProvider.swift} +0 -0
- /package/ios/{Swift/Objects → Objects}/JavaScriptObjectBuilder.swift +0 -0
- /package/ios/{Swift/Objects → Objects}/ObjectDefinition.swift +0 -0
- /package/ios/{Swift/Objects → Objects}/ObjectDefinitionBuilder.swift +0 -0
- /package/ios/{Swift/Objects → Objects}/ObjectDefinitionComponents.swift +0 -0
- /package/ios/{Swift/Objects → Objects}/PropertyComponent.swift +0 -0
- /package/ios/{Swift/Promise.swift → Promise.swift} +0 -0
- /package/ios/{Swift/Records → Records}/AnyField.swift +0 -0
- /package/ios/{Swift/Records → Records}/Field.swift +0 -0
- /package/ios/{Swift/Records → Records}/FieldExtensions.swift +0 -0
- /package/ios/{Swift/Records → Records}/FieldOption.swift +0 -0
- /package/ios/{Swift/Records → Records}/Record.swift +0 -0
- /package/ios/{Swift/SharedObjects → SharedObjects}/SharedObject.swift +0 -0
- /package/ios/{Swift/SharedObjects → SharedObjects}/SharedRef.swift +0 -0
- /package/ios/{Swift/TypedArrays → TypedArrays}/AnyTypedArray.swift +0 -0
- /package/ios/{Swift/TypedArrays → TypedArrays}/ConcreteTypedArrays.swift +0 -0
- /package/ios/{Swift/TypedArrays → TypedArrays}/GenericTypedArray.swift +0 -0
- /package/ios/{Swift/TypedArrays → TypedArrays}/TypedArray.swift +0 -0
- /package/ios/{Swift/Utilities.swift → Utilities.swift} +0 -0
- /package/ios/{Swift/Views → Views}/AnyViewProp.swift +0 -0
- /package/ios/{Swift/Views → Views}/ComponentData.swift +0 -0
- /package/ios/{Swift/Views → Views}/ConcreteViewProp.swift +0 -0
- /package/ios/{Swift/Views → Views}/ExpoView.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewDefinition.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewFactory.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewLifecycleMethod.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewManagerDefinition.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewManagerDefinitionBuilder.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewManagerDefinitionComponents.swift +0 -0
- /package/ios/{Swift/Views → Views}/ViewModuleWrapper.swift +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,62 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.10.0 — 2023-11-14
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
|
|
19
|
+
|
|
20
|
+
### 🎉 New features
|
|
21
|
+
|
|
22
|
+
- Add `preventModuleOverriding` to `ModuleRegistry.register` method. ([#24860](https://github.com/expo/expo/pull/24860) by [@wschurman](https://github.com/wschurman))
|
|
23
|
+
- [iOS] `CGFloat` can now be used as an argument type. ([#25140](https://github.com/expo/expo/pull/25140) by [@tsapeta](https://github.com/tsapeta))
|
|
24
|
+
|
|
25
|
+
### 🐛 Bug fixes
|
|
26
|
+
|
|
27
|
+
- Mock native code on web platforms. ([#25264](https://github.com/expo/expo/pull/25264) by [@EvanBacon](https://github.com/EvanBacon))
|
|
28
|
+
- [iOS] Fixed the object identifier for shared object types. ([#25060](https://github.com/expo/expo/pull/25060) by [@tsapeta](https://github.com/tsapeta))
|
|
29
|
+
- [iOS] Fixed concurrent functions (async/await) not converting results such as records and shared objects. ([#25075](https://github.com/expo/expo/pull/25075) by [@tsapeta](https://github.com/tsapeta))
|
|
30
|
+
- [iOS] Fixed concurrent functions (async/await) not supporting an owner argument (view and class functions). ([#25141](https://github.com/expo/expo/pull/25141) by [@tsapeta](https://github.com/tsapeta))
|
|
31
|
+
- Fixed UIView arguments not being resolved correctly when passed in with findNodeHandle ([#24703](https://github.com/expo/expo/pull/24703) by [@javache](https://github.com/javache))
|
|
32
|
+
- [Android] Improve boot time on low-end devices. ([#25267](https://github.com/expo/expo/pull/25267) by [@lukmccall](https://github.com/lukmccall))
|
|
33
|
+
- [Android] Improve performance of enum and map converters. ([#25272](https://github.com/expo/expo/pull/25272) by [@lukmccall](https://github.com/lukmccall))
|
|
34
|
+
- [Android] Improve logic responsible for obtaining converters that slow down the startup time. ([#25273](https://github.com/expo/expo/pull/25273) by [@lukmccall](https://github.com/lukmccall))
|
|
35
|
+
- [Android] Improving the creation process of views for better performance. ([#25274](https://github.com/expo/expo/pull/25274) by [@lukmccall](https://github.com/lukmccall))
|
|
36
|
+
|
|
37
|
+
### 💡 Others
|
|
38
|
+
|
|
39
|
+
- Remove `unimodule.json` in favour of `expo-module.config.json`. ([#25100](https://github.com/expo/expo/pull/25100) by [@reichhartd](https://github.com/reichhartd))
|
|
40
|
+
- Remove deprecated `REACT_NATIVE_OVERRIDE_VERSION` for React Native nightly testing. ([#25151](https://github.com/expo/expo/pull/25151) by [@kudo](https://github.com/kudo))
|
|
41
|
+
- Removed backward compatible code for deprecated SDKs. ([#25154](https://github.com/expo/expo/pull/25154) by [@kudo](https://github.com/kudo))
|
|
42
|
+
|
|
43
|
+
## 1.9.0 — 2023-10-17
|
|
44
|
+
|
|
45
|
+
### 🛠 Breaking changes
|
|
46
|
+
|
|
47
|
+
- Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
|
|
48
|
+
|
|
49
|
+
### 🎉 New features
|
|
50
|
+
|
|
51
|
+
- Add `CommonExceptions.ModuleNotFound`. ([#24898](https://github.com/expo/expo/pull/24898) by [@lukmccall](https://github.com/lukmccall))
|
|
52
|
+
- [Android] `Set<T>` can now be passed as an argument to a module method. ([#24897](https://github.com/expo/expo/pull/24897) by [@lukmccall](https://github.com/lukmccall))
|
|
53
|
+
|
|
54
|
+
### 🐛 Bug fixes
|
|
55
|
+
|
|
56
|
+
- Fixed typed arrays couldn't be returned from synchronous functions. ([#24744](https://github.com/expo/expo/pull/24744) by [@lukmccall](https://github.com/lukmccall))
|
|
57
|
+
- [iOS] Fixed exception when deallocating shared objects. ([#24836](https://github.com/expo/expo/pull/24836) by [@kudo](https://github.com/kudo))
|
|
58
|
+
- [Android] Fixed `null` or `undefined` wasn't converted to `JavaScriptValue`. ([#24899](https://github.com/expo/expo/pull/24899) by [@lukmccall](https://github.com/lukmccall))
|
|
59
|
+
- [Android] Fixed `Either` converter not working with types that have common representation in JavaScript. ([#24903](https://github.com/expo/expo/pull/24903) by [@lukmccall](https://github.com/lukmccall))
|
|
60
|
+
- [Android] `Any` converter doesn't use `ReadableMap` or `ReadableList` anymore. Objects and arrays are converted to Kotlin's primitives. ([#24963](https://github.com/expo/expo/pull/24963) by [@lukmccall](https://github.com/lukmccall))
|
|
61
|
+
|
|
62
|
+
### 💡 Others
|
|
63
|
+
|
|
64
|
+
- Improve tracking on Android. ([#24625](https://github.com/expo/expo/pull/24625) by [@lukmccall](https://github.com/lukmccall))
|
|
65
|
+
- Use native UUIDv5 generation on `Android` and `iOS`. ([#24200](https://github.com/expo/expo/pull/24200) by [@behenate](https://github.com/behenate))
|
|
66
|
+
- Ensure native modules are installed before required. ([#24746](https://github.com/expo/expo/pull/24746) by [@tsapeta](https://github.com/tsapeta))
|
|
67
|
+
- Clean up and restructure the modules core package directory. ([#24816](https://github.com/expo/expo/pull/24816) by [@tsapeta](https://github.com/tsapeta))
|
|
68
|
+
|
|
13
69
|
## 1.8.0 — 2023-09-15
|
|
14
70
|
|
|
15
71
|
### 🎉 New features
|
package/ExpoModulesCore.podspec
CHANGED
|
@@ -8,9 +8,6 @@ begin
|
|
|
8
8
|
rescue
|
|
9
9
|
reactNativeVersion = '0.0.0'
|
|
10
10
|
end
|
|
11
|
-
if ENV["REACT_NATIVE_OVERRIDE_VERSION"]
|
|
12
|
-
reactNativeVersion = ENV["REACT_NATIVE_OVERRIDE_VERSION"]
|
|
13
|
-
end
|
|
14
11
|
|
|
15
12
|
reactNativeMinorVersion = reactNativeVersion.split('.')[1].to_i
|
|
16
13
|
|
|
@@ -27,7 +24,7 @@ Pod::Spec.new do |s|
|
|
|
27
24
|
s.license = package['license']
|
|
28
25
|
s.author = package['author']
|
|
29
26
|
s.homepage = package['homepage']
|
|
30
|
-
s.platforms = { :ios => '13.
|
|
27
|
+
s.platforms = { :ios => '13.4', :tvos => '13.4'}
|
|
31
28
|
s.swift_version = '5.4'
|
|
32
29
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
33
30
|
s.static_framework = true
|
|
@@ -43,10 +40,6 @@ Pod::Spec.new do |s|
|
|
|
43
40
|
|
|
44
41
|
# EXAppDelegateWrapper -> RCTAppDelegate -> RCTCxxBridgeDelegate
|
|
45
42
|
'"${PODS_ROOT}/Headers/Private/React-Core"',
|
|
46
|
-
|
|
47
|
-
# similar to https://github.com/facebook/react-native/commit/c4b51e8d7, review this when we drop SDK 47
|
|
48
|
-
'"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging"',
|
|
49
|
-
'"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers"',
|
|
50
43
|
]
|
|
51
44
|
|
|
52
45
|
# Swift/Objective-C compatibility
|
package/android/CMakeLists.txt
CHANGED
|
@@ -6,7 +6,6 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
6
6
|
set(CMAKE_CXX_STANDARD 17)
|
|
7
7
|
set(PACKAGE_NAME "expo-modules-core")
|
|
8
8
|
set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
9
|
-
set(ignoreMe "${PROJECT_BUILD_DIR} ${REACT_ANDROID_BUILD_DIR} ${REACT_ANDROID_DIR} ${BOOST_VERSION}")
|
|
10
9
|
|
|
11
10
|
string(APPEND CMAKE_CXX_FLAGS " -DREACT_NATIVE_TARGET_VERSION=${REACT_NATIVE_TARGET_VERSION}")
|
|
12
11
|
|
|
@@ -66,14 +65,6 @@ target_compile_options(CommonSettings INTERFACE
|
|
|
66
65
|
${NEW_ARCHITECTURE_COMPILE_OPTIONS}
|
|
67
66
|
)
|
|
68
67
|
|
|
69
|
-
# Extracted AAR: ${BUILD_DIR}/react-native-0*/jni/${ANDROID_ABI}
|
|
70
|
-
file(GLOB LIBRN_DIR "${REACT_NATIVE_SO_DIR}/${ANDROID_ABI}")
|
|
71
|
-
if (NOT LIBRN_DIR)
|
|
72
|
-
# If /${ANDROID_ABI} dir not found, then ${REACT_NATIVE_SO_DIR} is probably:
|
|
73
|
-
# ReactAndroid/build/react-ndk/exported
|
|
74
|
-
file(GLOB LIBRN_DIR "${REACT_NATIVE_SO_DIR}")
|
|
75
|
-
endif ()
|
|
76
|
-
|
|
77
68
|
# tests
|
|
78
69
|
|
|
79
70
|
if(${UNIT_TEST})
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
class KotlinExpoModulesCorePlugin implements Plugin<Project> {
|
|
2
2
|
void apply(Project project) {
|
|
3
|
+
// For compatibility reasons the plugin needs to declare that it provides common build.gradle
|
|
4
|
+
// options for the modules
|
|
5
|
+
project.rootProject.ext.expoProvidesDefaultConfig = {
|
|
6
|
+
true
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
project.ext.safeExtGet = { prop, fallback ->
|
|
10
|
+
project.rootProject.ext.has(prop) ? project.rootProject.ext.get(prop) : fallback
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
project.buildscript {
|
|
4
14
|
project.ext.kotlinVersion = {
|
|
5
15
|
project.rootProject.ext.has("kotlinVersion")
|
|
@@ -23,212 +33,64 @@ class KotlinExpoModulesCorePlugin implements Plugin<Project> {
|
|
|
23
33
|
: "1.8.10-1.0.9"
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
// Setup build options that are common for all modules
|
|
38
|
+
if (project.plugins.hasPlugin('kotlin-android')) {
|
|
39
|
+
project.android {
|
|
40
|
+
compileSdkVersion project.ext.safeExtGet("compileSdkVersion", 34)
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// [BEGIN] Remove when we drop SDK 47
|
|
38
|
-
abstract class ExtractReactNativeAARTask extends DefaultTask {
|
|
39
|
-
@Input
|
|
40
|
-
abstract Property<String> getBuildType()
|
|
41
|
-
|
|
42
|
-
@Input
|
|
43
|
-
abstract Property<String> getReactNativeDir()
|
|
42
|
+
defaultConfig {
|
|
43
|
+
minSdkVersion project.ext.safeExtGet("minSdkVersion", 23)
|
|
44
|
+
targetSdkVersion project.ext.safeExtGet("targetSdkVersion", 34)
|
|
45
|
+
}
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def rnAARs = project.fileTree("${reactNativeDir.get()}/android").matching { include "**/react-native/**/*${suffix}.aar" }
|
|
49
|
-
if (rnAARs.isEmpty()) {
|
|
50
|
-
rnAARs = project.fileTree("${reactNativeDir.get()}/android").matching { include "**/react-native/**/*.aar" }
|
|
51
|
-
}
|
|
52
|
-
if (rnAARs.any()) {
|
|
53
|
-
// node_modules/react-native has a .aar, extract headers
|
|
54
|
-
if (rnAARs.size() > 1) {
|
|
55
|
-
logger.error("More than one React Native AAR file has been found:")
|
|
56
|
-
rnAARs.each {println(it) }
|
|
57
|
-
throw new GradleException("Multiple React Native AARs found:\n${rnAARs.join("\n")}" +
|
|
58
|
-
"\nRemove the old ones and try again")
|
|
47
|
+
lintOptions {
|
|
48
|
+
abortOnError false
|
|
49
|
+
}
|
|
59
50
|
}
|
|
60
51
|
}
|
|
61
|
-
def rnAAR = rnAARs.singleFile
|
|
62
|
-
def file = rnAAR.absoluteFile
|
|
63
|
-
def packageName = file.name.tokenize('-')[0]
|
|
64
|
-
project.copy {
|
|
65
|
-
from project.zipTree(file)
|
|
66
|
-
into "${project.buildDir}/${packageName}"
|
|
67
|
-
include "jni/**/*"
|
|
68
|
-
}
|
|
69
52
|
}
|
|
70
53
|
}
|
|
71
54
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
ext.applyKotlinExpoModulesCorePlugin = {
|
|
56
|
+
apply plugin: KotlinExpoModulesCorePlugin
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
ext.useExpoPublishing = {
|
|
60
|
+
afterEvaluate {
|
|
61
|
+
publishing {
|
|
62
|
+
publications {
|
|
63
|
+
release(MavenPublication) {
|
|
64
|
+
from components.release
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
repositories {
|
|
68
|
+
maven {
|
|
69
|
+
url = mavenLocal().url
|
|
81
70
|
}
|
|
82
71
|
}
|
|
83
|
-
return false
|
|
84
72
|
}
|
|
85
|
-
buildTasks.forEach { task -> task.dependsOn(dependsOnTask) }
|
|
86
73
|
}
|
|
87
74
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, project.rootDir).text.trim()).parent
|
|
93
|
-
|
|
94
|
-
def reactProperties = new Properties()
|
|
95
|
-
new File("$REACT_NATIVE_DIR/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) }
|
|
96
|
-
def FOLLY_VERSION = reactProperties.getProperty("FOLLY_VERSION")
|
|
97
|
-
def DOUBLE_CONVERSION_VERSION = reactProperties.getProperty("DOUBLE_CONVERSION_VERSION")
|
|
98
|
-
def REACT_NATIVE_VERSION = System.getenv("REACT_NATIVE_OVERRIDE_VERSION") ?: reactProperties.getProperty("VERSION_NAME")
|
|
99
|
-
def REACT_NATIVE_TARGET_VERSION = REACT_NATIVE_VERSION.split("\\.")[1].toInteger()
|
|
100
|
-
|
|
101
|
-
def isNewArchitectureEnabled = project.findProperty("newArchEnabled") == "true"
|
|
102
|
-
def customDownloadsDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
|
|
103
|
-
def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File("${project.buildDir}/downloads")
|
|
104
|
-
def thirdPartyNdkDir = new File("${project.buildDir}/third-party-ndk")
|
|
105
|
-
def reactNativeThirdParty = new File("$REACT_NATIVE_DIR/ReactAndroid/src/main/jni/third-party")
|
|
106
|
-
|
|
107
|
-
def createNativeDepsDirectories = project.tasks.findByName('createNativeDepsDirectories') ?: project.tasks.register('createNativeDepsDirectories') {
|
|
108
|
-
downloadsDir.mkdirs()
|
|
109
|
-
thirdPartyNdkDir.mkdirs()
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
def extractReactNativeAARRelease = project.tasks.register('extractReactNativeAARRelease', ExtractReactNativeAARTask) {
|
|
113
|
-
reactNativeDir = REACT_NATIVE_DIR
|
|
114
|
-
buildType = 'Release'
|
|
115
|
-
}
|
|
116
|
-
def extractReactNativeAARDebug = project.tasks.register('extractReactNativeAARDebug', ExtractReactNativeAARTask) {
|
|
117
|
-
reactNativeDir = REACT_NATIVE_DIR
|
|
118
|
-
buildType = 'Debug'
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
def packageReactNdkDebugLibs = project.tasks.register("packageReactNdkDebugLibs", Copy) {
|
|
122
|
-
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
|
|
123
|
-
from("$REACT_NATIVE_DIR/ReactAndroid/src/main/jni/prebuilt/lib")
|
|
124
|
-
into("${project.buildDir}/react-ndk/exported")
|
|
125
|
-
}
|
|
126
|
-
def packageReactNdkReleaseLibs = project.tasks.register("packageReactNdkReleaseLibs", Copy) {
|
|
127
|
-
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
|
|
128
|
-
from("$REACT_NATIVE_DIR/ReactAndroid/src/main/jni/prebuilt/lib")
|
|
129
|
-
into("${project.buildDir}/react-ndk/exported")
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// [BEGIN] Extra libs
|
|
133
|
-
def downloadDoubleConversion = project.tasks.create('downloadDoubleConversion', project.Download) {
|
|
134
|
-
dependsOn(createNativeDepsDirectories)
|
|
135
|
-
src("https://github.com/google/double-conversion/archive/v${DOUBLE_CONVERSION_VERSION}.tar.gz")
|
|
136
|
-
onlyIfNewer(true)
|
|
137
|
-
overwrite(false)
|
|
138
|
-
dest(new File(downloadsDir, "double-conversion-${DOUBLE_CONVERSION_VERSION}.tar.gz"))
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
def prepareDoubleConversion = project.tasks.register('prepareDoubleConversion', Copy) {
|
|
142
|
-
dependsOn(downloadDoubleConversion)
|
|
143
|
-
from(project.tarTree(downloadDoubleConversion.dest))
|
|
144
|
-
from("$reactNativeThirdParty/double-conversion/Android.mk")
|
|
145
|
-
include("double-conversion-${DOUBLE_CONVERSION_VERSION}/src/**/*", "Android.mk")
|
|
146
|
-
filesMatching("*/src/**/*", { fname -> fname.path = "double-conversion/${fname.name}" })
|
|
147
|
-
includeEmptyDirs = false
|
|
148
|
-
into("$thirdPartyNdkDir/double-conversion")
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
def downloadFolly = project.tasks.create('downloadFolly', project.Download) {
|
|
152
|
-
dependsOn(createNativeDepsDirectories)
|
|
153
|
-
src("https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz")
|
|
154
|
-
onlyIfNewer(true)
|
|
155
|
-
overwrite(false)
|
|
156
|
-
dest(new File(downloadsDir, "folly-${FOLLY_VERSION}.tar.gz"))
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
def prepareFolly = project.tasks.register('prepareFolly', Copy) {
|
|
160
|
-
dependsOn(downloadFolly)
|
|
161
|
-
from(project.tarTree(downloadFolly.dest))
|
|
162
|
-
from("$reactNativeThirdParty/folly/Android.mk")
|
|
163
|
-
include("folly-${FOLLY_VERSION}/folly/**/*", "Android.mk")
|
|
164
|
-
eachFile { fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/") }
|
|
165
|
-
// Fixes problem with Folly failing to build on certain systems. See
|
|
166
|
-
// https://github.com/software-mansion/react-native-reanimated/issues/1024
|
|
167
|
-
def follyReplaceContent = '''
|
|
168
|
-
ssize_t r;
|
|
169
|
-
do {
|
|
170
|
-
r = open(name, flags, mode);
|
|
171
|
-
} while (r == -1 && errno == EINTR);
|
|
172
|
-
return r;
|
|
173
|
-
'''
|
|
174
|
-
filter { line -> line.replaceAll("return int\\(wrapNoInt\\(open, name, flags, mode\\)\\);", follyReplaceContent) }
|
|
175
|
-
includeEmptyDirs = false
|
|
176
|
-
into("$thirdPartyNdkDir/folly")
|
|
177
|
-
}
|
|
178
|
-
// [END] Extra libs
|
|
179
|
-
|
|
180
|
-
project.afterEvaluate {
|
|
181
|
-
if (REACT_NATIVE_BUILD_FROM_SOURCE) {
|
|
182
|
-
nativeBuildDependsOn(project, ":ReactAndroid:copyReleaseJniLibsProjectOnly", ["Release", "RelWithDebInfo"])
|
|
183
|
-
nativeBuildDependsOn(project, ":ReactAndroid:copyDebugJniLibsProjectOnly", ["Debug"])
|
|
184
|
-
} else {
|
|
185
|
-
nativeBuildDependsOn(project, extractReactNativeAARRelease, ["Release", "RelWithDebInfo"])
|
|
186
|
-
nativeBuildDependsOn(project, extractReactNativeAARDebug, ["Debug"])
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
def extraLibs = project.extensions.extraProperties.has('extraLegacyReactNativeLibs')
|
|
190
|
-
? project.extensions.extraProperties.get('extraLegacyReactNativeLibs')
|
|
191
|
-
: []
|
|
192
|
-
extraLibs.each {
|
|
193
|
-
nativeBuildDependsOn(project, project.tasks.named(it), null)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (isNewArchitectureEnabled) {
|
|
197
|
-
def preDebugBuild = project.tasks.named('preDebugBuild')
|
|
198
|
-
def preReleaseBuild = project.tasks.named('preReleaseBuild')
|
|
199
|
-
preDebugBuild.configure {
|
|
200
|
-
dependsOn(packageReactNdkDebugLibs)
|
|
201
|
-
}
|
|
202
|
-
preReleaseBuild.configure {
|
|
203
|
-
dependsOn(packageReactNdkReleaseLibs)
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Due to a bug inside AGP, we have to explicitly set a dependency
|
|
207
|
-
// between configureCMake* tasks and the preBuild tasks.
|
|
208
|
-
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
|
|
209
|
-
project.tasks.named('configureCMakeDebug').configure {
|
|
210
|
-
dependsOn(preDebugBuild)
|
|
211
|
-
}
|
|
212
|
-
project.tasks.named('configureCMakeRelWithDebInfo').configure {
|
|
213
|
-
dependsOn(preReleaseBuild)
|
|
214
|
-
}
|
|
215
|
-
def reactNativeArchitectures = project.getProperties().get("reactNativeArchitectures")?.split(",") ?: ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
216
|
-
|
|
217
|
-
reactNativeArchitectures.each { architecture ->
|
|
218
|
-
project.tasks.named("configureCMakeDebug[${architecture}]")?.configure {
|
|
219
|
-
dependsOn("preDebugBuild")
|
|
220
|
-
}
|
|
221
|
-
project.tasks.named("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
|
|
222
|
-
dependsOn("preReleaseBuild")
|
|
223
|
-
}
|
|
224
|
-
}
|
|
75
|
+
android {
|
|
76
|
+
publishing {
|
|
77
|
+
singleVariant("release") {
|
|
78
|
+
withSourcesJar()
|
|
225
79
|
}
|
|
226
80
|
}
|
|
227
81
|
}
|
|
228
82
|
}
|
|
229
83
|
|
|
230
|
-
ext.
|
|
231
|
-
|
|
84
|
+
ext.useCoreDependencies = {
|
|
85
|
+
dependencies {
|
|
86
|
+
// Avoids cyclic dependencies
|
|
87
|
+
if (!project.project.name.startsWith("expo-modules-core")) {
|
|
88
|
+
implementation project.project(':expo-modules-core')
|
|
89
|
+
}
|
|
90
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${project.ext.kotlinVersion()}"
|
|
91
|
+
}
|
|
232
92
|
}
|
|
233
93
|
|
|
234
|
-
|
|
94
|
+
ext.boolish = { value ->
|
|
95
|
+
return value.toString().toBoolean()
|
|
96
|
+
}
|
package/android/build.gradle
CHANGED
|
@@ -3,18 +3,22 @@ import java.nio.file.Paths
|
|
|
3
3
|
apply plugin: 'com.android.library'
|
|
4
4
|
apply plugin: 'kotlin-android'
|
|
5
5
|
apply plugin: 'maven-publish'
|
|
6
|
-
apply plugin: "de.undercouch.download"
|
|
7
6
|
|
|
8
7
|
group = 'host.exp.exponent'
|
|
9
|
-
version = '1.
|
|
8
|
+
version = '1.10.0'
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
11
|
+
if (expoModulesCorePlugin.exists()) {
|
|
12
|
+
apply from: expoModulesCorePlugin
|
|
13
|
+
applyKotlinExpoModulesCorePlugin()
|
|
14
|
+
|
|
15
|
+
// Remove this check, but keep the contents after SDK49 support is dropped
|
|
16
|
+
if (safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
17
|
+
useExpoPublishing()
|
|
16
18
|
}
|
|
19
|
+
}
|
|
17
20
|
|
|
21
|
+
buildscript {
|
|
18
22
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
19
23
|
ext.safeExtGet = { prop, fallback ->
|
|
20
24
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -35,7 +39,6 @@ buildscript {
|
|
|
35
39
|
|
|
36
40
|
dependencies {
|
|
37
41
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
38
|
-
classpath("de.undercouch:gradle-download-task:5.3.0")
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -49,28 +52,17 @@ def isExpoModulesCoreTests = {
|
|
|
49
52
|
return false
|
|
50
53
|
}.call()
|
|
51
54
|
|
|
52
|
-
def customDownloadsDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
|
|
53
|
-
def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File("$buildDir/downloads")
|
|
54
|
-
def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
|
|
55
|
-
|
|
56
55
|
def REACT_NATIVE_BUILD_FROM_SOURCE = findProject(":packages:react-native:ReactAndroid") != null
|
|
57
56
|
def REACT_NATIVE_DIR = REACT_NATIVE_BUILD_FROM_SOURCE
|
|
58
57
|
? findProject(":packages:react-native:ReactAndroid").getProjectDir().parent
|
|
59
58
|
: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).parent
|
|
60
|
-
def REACT_NATIVE_SO_DIR = REACT_NATIVE_BUILD_FROM_SOURCE
|
|
61
|
-
? Paths.get(findProject(":packages:react-native:ReactAndroid").getProjectDir().toString(), "build", "intermediates", "library_*", "*", "jni")
|
|
62
|
-
: "${buildDir}/react/jni"
|
|
63
59
|
|
|
64
60
|
def reactProperties = new Properties()
|
|
65
61
|
file("$REACT_NATIVE_DIR/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) }
|
|
66
62
|
|
|
67
|
-
|
|
68
|
-
def BOOST_VERSION = reactProperties.getProperty("BOOST_VERSION") ?: "1_76_0"
|
|
69
|
-
def REACT_NATIVE_VERSION = System.getenv("REACT_NATIVE_OVERRIDE_VERSION") ?: reactProperties.getProperty("VERSION_NAME")
|
|
63
|
+
def REACT_NATIVE_VERSION = reactProperties.getProperty("VERSION_NAME")
|
|
70
64
|
def REACT_NATIVE_TARGET_VERSION = REACT_NATIVE_VERSION.split("\\.")[1].toInteger()
|
|
71
65
|
|
|
72
|
-
def reactNativeThirdParty = new File("$REACT_NATIVE_DIR/ReactAndroid/src/main/jni/third-party")
|
|
73
|
-
|
|
74
66
|
def reactNativeArchitectures() {
|
|
75
67
|
def value = project.getProperties().get("reactNativeArchitectures")
|
|
76
68
|
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
@@ -89,23 +81,44 @@ USE_HERMES = USE_HERMES && isExpoModulesCoreTests
|
|
|
89
81
|
|
|
90
82
|
def isNewArchitectureEnabled = findProperty("newArchEnabled") == "true"
|
|
91
83
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
85
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
86
|
+
afterEvaluate {
|
|
87
|
+
publishing {
|
|
88
|
+
publications {
|
|
89
|
+
release(MavenPublication) {
|
|
90
|
+
from components.release
|
|
91
|
+
}
|
|
97
92
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
repositories {
|
|
94
|
+
maven {
|
|
95
|
+
url = mavenLocal().url
|
|
96
|
+
}
|
|
102
97
|
}
|
|
103
98
|
}
|
|
104
99
|
}
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
android {
|
|
108
|
-
|
|
103
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
104
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
105
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
106
|
+
|
|
107
|
+
defaultConfig {
|
|
108
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
109
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
publishing {
|
|
113
|
+
singleVariant("release") {
|
|
114
|
+
withSourcesJar()
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
lintOptions {
|
|
119
|
+
abortOnError false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
109
122
|
|
|
110
123
|
if (rootProject.hasProperty("ndkPath")) {
|
|
111
124
|
ndkPath rootProject.ext.ndkPath
|
|
@@ -128,11 +141,9 @@ android {
|
|
|
128
141
|
|
|
129
142
|
namespace "expo.modules"
|
|
130
143
|
defaultConfig {
|
|
131
|
-
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
132
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
133
144
|
consumerProguardFiles 'proguard-rules.pro'
|
|
134
145
|
versionCode 1
|
|
135
|
-
versionName "1.
|
|
146
|
+
versionName "1.10.0"
|
|
136
147
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
137
148
|
|
|
138
149
|
testInstrumentationRunner "expo.modules.TestRunner"
|
|
@@ -142,14 +153,9 @@ android {
|
|
|
142
153
|
abiFilters (*reactNativeArchitectures())
|
|
143
154
|
arguments "-DANDROID_STL=c++_shared",
|
|
144
155
|
"-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
|
|
145
|
-
"-DREACT_NATIVE_SO_DIR=${REACT_NATIVE_SO_DIR}",
|
|
146
156
|
"-DREACT_NATIVE_TARGET_VERSION=${REACT_NATIVE_TARGET_VERSION}",
|
|
147
|
-
"-DBOOST_VERSION=${BOOST_VERSION}",
|
|
148
157
|
"-DUSE_HERMES=${USE_HERMES}",
|
|
149
158
|
"-DIS_NEW_ARCHITECTURE_ENABLED=${isNewArchitectureEnabled}",
|
|
150
|
-
"-DPROJECT_BUILD_DIR=$buildDir",
|
|
151
|
-
"-DREACT_ANDROID_DIR=${REACT_NATIVE_DIR}/ReactAndroid",
|
|
152
|
-
"-DREACT_ANDROID_BUILD_DIR=${REACT_NATIVE_DIR}/ReactAndroid/build",
|
|
153
159
|
"-DUNIT_TEST=${isExpoModulesCoreTests}"
|
|
154
160
|
}
|
|
155
161
|
}
|
|
@@ -157,23 +163,7 @@ android {
|
|
|
157
163
|
|
|
158
164
|
externalNativeBuild {
|
|
159
165
|
cmake {
|
|
160
|
-
|
|
161
|
-
path "CMakeLists.txt"
|
|
162
|
-
} else {
|
|
163
|
-
path "legacy/CMakeLists.txt"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
sourceSets {
|
|
169
|
-
main {
|
|
170
|
-
java {
|
|
171
|
-
if (REACT_NATIVE_TARGET_VERSION >= 73) {
|
|
172
|
-
srcDirs += "src/reactnative"
|
|
173
|
-
} else {
|
|
174
|
-
srcDirs += "src/reactnative72"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
166
|
+
path "CMakeLists.txt"
|
|
177
167
|
}
|
|
178
168
|
}
|
|
179
169
|
|
|
@@ -217,9 +207,6 @@ android {
|
|
|
217
207
|
}
|
|
218
208
|
}
|
|
219
209
|
|
|
220
|
-
lintOptions {
|
|
221
|
-
abortOnError false
|
|
222
|
-
}
|
|
223
210
|
|
|
224
211
|
testOptions {
|
|
225
212
|
unitTests.includeAndroidResources = true
|
|
@@ -234,11 +221,6 @@ android {
|
|
|
234
221
|
}
|
|
235
222
|
}
|
|
236
223
|
}
|
|
237
|
-
publishing {
|
|
238
|
-
singleVariant("release") {
|
|
239
|
-
withSourcesJar()
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
224
|
}
|
|
243
225
|
|
|
244
226
|
|
|
@@ -293,60 +275,3 @@ dependencies {
|
|
|
293
275
|
}
|
|
294
276
|
}
|
|
295
277
|
}
|
|
296
|
-
|
|
297
|
-
def createNativeDepsDirectories = project.tasks.findByName('createNativeDepsDirectories') ?: project.tasks.register('createNativeDepsDirectories') {
|
|
298
|
-
downloadsDir.mkdirs()
|
|
299
|
-
thirdPartyNdkDir.mkdirs()
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
def downloadBoost = tasks.create('downloadBoost', Download) {
|
|
303
|
-
dependsOn(createNativeDepsDirectories)
|
|
304
|
-
def srcUrl = REACT_NATIVE_TARGET_VERSION >= 69
|
|
305
|
-
? "https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz"
|
|
306
|
-
: "https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz"
|
|
307
|
-
src(srcUrl)
|
|
308
|
-
onlyIfNewer(true)
|
|
309
|
-
overwrite(false)
|
|
310
|
-
dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
def prepareBoost = tasks.register('prepareBoost', Copy) {
|
|
314
|
-
dependsOn(downloadBoost)
|
|
315
|
-
from(tarTree(resources.gzip(downloadBoost.dest)))
|
|
316
|
-
from("$reactNativeThirdParty/boost/Android.mk")
|
|
317
|
-
include("Android.mk", "boost_${BOOST_VERSION}/boost/**/*.hpp", "boost/boost/**/*.hpp")
|
|
318
|
-
includeEmptyDirs = false
|
|
319
|
-
into("$thirdPartyNdkDir/boost")
|
|
320
|
-
doLast {
|
|
321
|
-
new File("$thirdPartyNdkDir/boost/boost").renameTo("$thirdPartyNdkDir/boost/boost_${BOOST_VERSION}")
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
void nativeBuildDependsOn(project, dependsOnTask, buildTypesIncludes) {
|
|
326
|
-
def buildTasks = project.tasks.findAll { task ->
|
|
327
|
-
def taskName = task.name
|
|
328
|
-
if (taskName.contains("Clean")) { return false }
|
|
329
|
-
if (taskName.contains("externalNative") || taskName.contains("CMake") || taskName.contains("generateJsonModel")) {
|
|
330
|
-
if (buildTypesIncludes == null) { return true }
|
|
331
|
-
for (buildType in buildTypesIncludes) {
|
|
332
|
-
if (taskName.contains(buildType)) { return true }
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return false
|
|
336
|
-
}
|
|
337
|
-
buildTasks.forEach { task -> task.dependsOn(dependsOnTask) }
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
afterEvaluate {
|
|
341
|
-
if (REACT_NATIVE_TARGET_VERSION < 71) {
|
|
342
|
-
nativeBuildDependsOn(project, prepareBoost, null)
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (REACT_NATIVE_TARGET_VERSION < 71) {
|
|
347
|
-
project.ext.extraLegacyReactNativeLibs = [
|
|
348
|
-
'prepareDoubleConversion',
|
|
349
|
-
'prepareFolly',
|
|
350
|
-
]
|
|
351
|
-
applyLegacyReactNativeLibsExtractionPlugin()
|
|
352
|
-
}
|