expo-modules-core 0.6.0 → 0.6.1
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
CHANGED
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.6.
|
|
6
|
+
version = '0.6.1'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
@@ -58,7 +58,7 @@ android {
|
|
|
58
58
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
|
59
59
|
consumerProguardFiles 'proguard-rules.pro'
|
|
60
60
|
versionCode 1
|
|
61
|
-
versionName "0.6.
|
|
61
|
+
versionName "0.6.1"
|
|
62
62
|
}
|
|
63
63
|
lintOptions {
|
|
64
64
|
abortOnError false
|
|
@@ -15,6 +15,7 @@ import expo.modules.core.ModuleRegistry;
|
|
|
15
15
|
import expo.modules.core.interfaces.InternalModule;
|
|
16
16
|
import expo.modules.core.interfaces.Package;
|
|
17
17
|
import expo.modules.kotlin.KotlinInteropModuleRegistry;
|
|
18
|
+
import expo.modules.kotlin.ModulesProvider;
|
|
18
19
|
import expo.modules.kotlin.views.ViewWrapperDelegateHolder;
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -24,6 +25,7 @@ import expo.modules.kotlin.views.ViewWrapperDelegateHolder;
|
|
|
24
25
|
*/
|
|
25
26
|
public class ModuleRegistryAdapter implements ReactPackage {
|
|
26
27
|
protected ReactModuleRegistryProvider mModuleRegistryProvider;
|
|
28
|
+
protected ModulesProvider mModulesProvider;
|
|
27
29
|
protected ReactAdapterPackage mReactAdapterPackage = new ReactAdapterPackage();
|
|
28
30
|
private NativeModulesProxy mModulesProxy;
|
|
29
31
|
// We need to save all view holders to update them when the new kotlin module registry will be created.
|
|
@@ -37,6 +39,11 @@ public class ModuleRegistryAdapter implements ReactPackage {
|
|
|
37
39
|
mModuleRegistryProvider = moduleRegistryProvider;
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
public ModuleRegistryAdapter(ReactModuleRegistryProvider moduleRegistryProvider, ModulesProvider modulesProvider) {
|
|
43
|
+
mModuleRegistryProvider = moduleRegistryProvider;
|
|
44
|
+
mModulesProvider = modulesProvider;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
@Override
|
|
41
48
|
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
42
49
|
ModuleRegistry moduleRegistry = mModuleRegistryProvider.get(reactContext);
|
|
@@ -57,7 +64,7 @@ public class ModuleRegistryAdapter implements ReactPackage {
|
|
|
57
64
|
protected List<NativeModule> getNativeModulesFromModuleRegistry(ReactApplicationContext reactContext, ModuleRegistry moduleRegistry) {
|
|
58
65
|
List<NativeModule> nativeModulesList = new ArrayList<>(2);
|
|
59
66
|
|
|
60
|
-
mModulesProxy =
|
|
67
|
+
mModulesProxy = createNativeModulesProxy(reactContext, moduleRegistry);
|
|
61
68
|
nativeModulesList.add(mModulesProxy);
|
|
62
69
|
|
|
63
70
|
// Add listener that will notify expo.modules.core.ModuleRegistry when all modules are ready
|
|
@@ -97,4 +104,12 @@ public class ModuleRegistryAdapter implements ReactPackage {
|
|
|
97
104
|
|
|
98
105
|
return viewManagerList;
|
|
99
106
|
}
|
|
107
|
+
|
|
108
|
+
private NativeModulesProxy createNativeModulesProxy(ReactApplicationContext reactContext, ModuleRegistry moduleRegistry) {
|
|
109
|
+
if (mModulesProvider != null) {
|
|
110
|
+
return new NativeModulesProxy(reactContext, moduleRegistry, mModulesProvider);
|
|
111
|
+
} else {
|
|
112
|
+
return new NativeModulesProxy(reactContext, moduleRegistry);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
100
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@testing-library/react-hooks": "^7.0.1",
|
|
43
43
|
"expo-module-scripts": "^2.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "cf8e7fde1b19e10dd9b74a8af0e9362ae8e14001"
|
|
46
46
|
}
|