forked from Ivasoft/mattermost-mobile
Upgrade unimodules with expo to use expo-file-system
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
apply plugin: "com.android.application"
|
||||
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
|
||||
apply plugin: 'kotlin-android'
|
||||
import com.android.build.OutputFile
|
||||
|
||||
@@ -246,13 +245,6 @@ dependencies {
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
|
||||
addUnimodulesDependencies([exclude: [
|
||||
'expo-image-loader',
|
||||
'expo-permissions',
|
||||
'expo-application',
|
||||
'expo-face-detector',
|
||||
]])
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mattermost.rnbeta;
|
||||
|
||||
import com.facebook.react.bridge.JSIModuleSpec;
|
||||
import com.facebook.react.bridge.JavaScriptContextHolder;
|
||||
import com.mattermost.rnbeta.generated.BasePackageList;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@@ -40,9 +39,6 @@ import com.facebook.react.module.model.ReactModuleInfoProvider;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import org.unimodules.adapters.react.ModuleRegistryAdapter;
|
||||
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
|
||||
|
||||
import com.mattermost.networkclient.RCTOkHttpClientFactory;
|
||||
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
||||
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage;
|
||||
@@ -52,8 +48,6 @@ public class MainApplication extends NavigationApplication implements INotificat
|
||||
|
||||
public Boolean sharedExtensionIsOpened = false;
|
||||
|
||||
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null);
|
||||
|
||||
private final ReactNativeHost mReactNativeHost =
|
||||
new ReactNativeHost(this) {
|
||||
@Override
|
||||
@@ -68,11 +62,6 @@ public class MainApplication extends NavigationApplication implements INotificat
|
||||
// packages.add(new MyReactNativePackage());
|
||||
packages.add(new RNNotificationsPackage(MainApplication.this));
|
||||
|
||||
// Add unimodules
|
||||
List<ReactPackage> unimodules = Collections.singletonList(
|
||||
new ModuleRegistryAdapter(mModuleRegistryProvider)
|
||||
);
|
||||
packages.addAll(unimodules);
|
||||
|
||||
packages.add(
|
||||
new TurboReactPackage() {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.mattermost.rnbeta.generated;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.unimodules.core.interfaces.Package;
|
||||
|
||||
public class BasePackageList {
|
||||
public List<Package> getPackageList() {
|
||||
return Arrays.<Package>asList(
|
||||
new expo.modules.constants.ConstantsPackage(),
|
||||
new expo.modules.filesystem.FileSystemPackage()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
rootProject.name = 'Mattermost'
|
||||
include ':reactnativenotifications'
|
||||
project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app')
|
||||
apply from: '../node_modules/react-native-unimodules/gradle.groovy'; includeUnimodulesProjects()
|
||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||
include ':app'
|
||||
include ':watermelondb-jsi'
|
||||
project(':watermelondb-jsi').projectDir =
|
||||
new File(rootProject.projectDir, '../node_modules/@nozbe/watermelondb/native/android-jsi')
|
||||
|
||||
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute().text.trim(), "../scripts/autolinking.gradle")
|
||||
useExpoModules()
|
||||
Reference in New Issue
Block a user