expo-modules-core 0.4.8 → 0.4.9
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 +6 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/core/interfaces/ApplicationLifecycleListener.java +10 -0
- package/android/src/main/java/expo/modules/core/interfaces/ReactActivityLifecycleListener.java +14 -0
- package/android/src/main/java/expo/modules/core/interfaces/{ReactNativeHostHandler.kt → ReactNativeHostHandler.java} +20 -15
- package/package.json +2 -2
- package/android/src/main/java/expo/modules/core/interfaces/ApplicationLifecycleListener.kt +0 -9
- package/android/src/main/java/expo/modules/core/interfaces/ReactActivityLifecycleListener.kt +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.4.9 — 2021-12-08
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Improve external Android handlers or listeners backward compatibility by Java 8 interface default method. ([#15421](https://github.com/expo/expo/pull/15421) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
13
19
|
## 0.4.8 — 2021-11-11
|
|
14
20
|
|
|
15
21
|
### 🐛 Bug fixes
|
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.4.
|
|
6
|
+
version = '0.4.9'
|
|
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.4.
|
|
61
|
+
versionName "0.4.9"
|
|
62
62
|
}
|
|
63
63
|
lintOptions {
|
|
64
64
|
abortOnError false
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
package expo.modules.core.interfaces;
|
|
2
|
+
|
|
3
|
+
import android.app.Application;
|
|
4
|
+
import android.content.res.Configuration;
|
|
5
|
+
|
|
6
|
+
public interface ApplicationLifecycleListener {
|
|
7
|
+
default void onCreate(Application application) {}
|
|
8
|
+
|
|
9
|
+
default void onConfigurationChanged(Configuration newConfig) {}
|
|
10
|
+
}
|
package/android/src/main/java/expo/modules/core/interfaces/ReactActivityLifecycleListener.java
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package expo.modules.core.interfaces;
|
|
2
|
+
|
|
3
|
+
import android.app.Activity;
|
|
4
|
+
import android.os.Bundle;
|
|
5
|
+
|
|
6
|
+
public interface ReactActivityLifecycleListener {
|
|
7
|
+
default void onCreate(Activity activity, Bundle savedInstanceState) {}
|
|
8
|
+
|
|
9
|
+
default void onResume(Activity activity) {}
|
|
10
|
+
|
|
11
|
+
default void onPause(Activity activity) {}
|
|
12
|
+
|
|
13
|
+
default void onDestroy(Activity activity) {}
|
|
14
|
+
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
package expo.modules.core.interfaces
|
|
1
|
+
package expo.modules.core.interfaces;
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.ReactInstanceManager
|
|
4
|
-
import com.facebook.react.bridge.JavaScriptContextHolder
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
3
|
+
import com.facebook.react.ReactInstanceManager;
|
|
4
|
+
import com.facebook.react.bridge.JavaScriptContextHolder;
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import androidx.annotation.Nullable;
|
|
8
|
+
|
|
9
|
+
public interface ReactNativeHostHandler {
|
|
8
10
|
/**
|
|
9
11
|
* Given chance for modules to customize {@link ReactInstanceManager}
|
|
10
12
|
*
|
|
11
13
|
* @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
|
|
12
14
|
* @return instance of {@link ReactInstanceManager}, or null if not to override
|
|
13
15
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
@Nullable
|
|
17
|
+
default ReactInstanceManager createReactInstanceManager(boolean useDeveloperSupport) {
|
|
18
|
+
return null;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -22,8 +25,9 @@ interface ReactNativeHostHandler {
|
|
|
22
25
|
* @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
|
|
23
26
|
* @return custom path to bundle file, or null if not to override
|
|
24
27
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
@Nullable
|
|
29
|
+
default String getJSBundleFile(boolean useDeveloperSupport) {
|
|
30
|
+
return null;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/**
|
|
@@ -33,8 +37,9 @@ interface ReactNativeHostHandler {
|
|
|
33
37
|
* @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
|
|
34
38
|
* @return custom bundle asset name, or null if not to override
|
|
35
39
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
@Nullable
|
|
41
|
+
default String getBundleAssetName(boolean useDeveloperSupport) {
|
|
42
|
+
return null;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
/**
|
|
@@ -42,10 +47,10 @@ interface ReactNativeHostHandler {
|
|
|
42
47
|
*
|
|
43
48
|
* @param useDeveloperSupport true if {@link ReactNativeHost} enabled developer support
|
|
44
49
|
*/
|
|
45
|
-
|
|
46
|
-
reactApplicationContext
|
|
47
|
-
jsContext
|
|
48
|
-
useDeveloperSupport
|
|
50
|
+
default void onRegisterJSIModules(
|
|
51
|
+
ReactApplicationContext reactApplicationContext,
|
|
52
|
+
JavaScriptContextHolder jsContext,
|
|
53
|
+
boolean useDeveloperSupport
|
|
49
54
|
) {
|
|
50
55
|
}
|
|
51
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
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": "6b983bdf1f0e89f38bbaa096393f8ba973332eb2"
|
|
46
46
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
package expo.modules.core.interfaces
|
|
2
|
-
|
|
3
|
-
import android.app.Application
|
|
4
|
-
import android.content.res.Configuration
|
|
5
|
-
|
|
6
|
-
interface ApplicationLifecycleListener {
|
|
7
|
-
fun onCreate(application: Application) {}
|
|
8
|
-
fun onConfigurationChanged(newConfig: Configuration) {}
|
|
9
|
-
}
|
package/android/src/main/java/expo/modules/core/interfaces/ReactActivityLifecycleListener.kt
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
package expo.modules.core.interfaces
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.os.Bundle
|
|
5
|
-
|
|
6
|
-
interface ReactActivityLifecycleListener {
|
|
7
|
-
fun onCreate(activity: Activity, savedInstanceState: Bundle?) {}
|
|
8
|
-
fun onResume(activity: Activity) {}
|
|
9
|
-
fun onPause(activity: Activity) {}
|
|
10
|
-
fun onDestroy(activity: Activity) {}
|
|
11
|
-
}
|