Enable WM JSI on Android
This commit is contained in:
parent
f8c2938065
commit
5ba91045d1
|
@ -261,12 +261,9 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
// packagingOptions {
|
||||
// pickFirst '**/armeabi-v7a/libc++_shared.so'
|
||||
// pickFirst '**/x86/libc++_shared.so'
|
||||
// pickFirst '**/arm64-v8a/libc++_shared.so'
|
||||
// pickFirst '**/x86_64/libc++_shared.so'
|
||||
// }
|
||||
packagingOptions {
|
||||
pickFirst '**/libc++_shared.so'
|
||||
}
|
||||
|
||||
// applicationVariants are e.g. debug, release
|
||||
|
||||
|
@ -352,6 +349,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':@react-native-community_viewpager')
|
||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||
implementation project(':watermelondb-jsi')
|
||||
playImplementation project(':react-native-notifications')
|
||||
playImplementation 'com.google.firebase:firebase-core:16.0.0'
|
||||
playImplementation project(':@react-native-firebase_app')
|
||||
|
|
|
@ -19,6 +19,9 @@ import android.content.res.Configuration;
|
|||
import expo.modules.ApplicationLifecycleDispatcher;
|
||||
import expo.modules.ReactNativeHostWrapper;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import com.facebook.react.bridge.JSIModuleSpec;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.JavaScriptContextHolder;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -26,6 +29,8 @@ import java.util.List;
|
|||
import chat.rocket.reactnative.newarchitecture.MainApplicationReactNativeHost;
|
||||
import chat.rocket.reactnative.networking.SSLPinningPackage;
|
||||
|
||||
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage;
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(this, new ReactNativeHost(this) {
|
||||
|
@ -52,7 +57,20 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
|
||||
@Override
|
||||
protected JSIModulePackage getJSIModulePackage() {
|
||||
return new ReanimatedJSIModulePackage();
|
||||
return new JSIModulePackage() {
|
||||
@Override
|
||||
public List<JSIModuleSpec> getJSIModules(
|
||||
final ReactApplicationContext reactApplicationContext,
|
||||
final JavaScriptContextHolder jsContext
|
||||
) {
|
||||
List<JSIModuleSpec> modules = Arrays.asList();
|
||||
|
||||
modules.addAll(new WatermelonDBJSIPackage().getJSIModules(reactApplicationContext, jsContext));
|
||||
modules.addAll(new ReanimatedJSIModulePackage().getJSIModules(reactApplicationContext, jsContext));
|
||||
|
||||
return modules;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,6 +7,8 @@ include ':@react-native-firebase_analytics'
|
|||
project(':@react-native-firebase_analytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/analytics/android')
|
||||
include ':@react-native-firebase_crashlytics'
|
||||
project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-firebase/crashlytics/android')
|
||||
include ':watermelondb-jsi'
|
||||
project(':watermelondb-jsi').projectDir = new File(rootProject.projectDir, '../node_modules/@nozbe/watermelondb/native/android-jsi')
|
||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||
include ':app'
|
||||
|
||||
|
|
Loading…
Reference in New Issue