This commit does many things : - Upgrade `react-native ` to `0.72.5` - Upgrade `react-native-reanimated` to `3.5.4` - Upgrade `react-native-navigation` to `7.37.0` - `ndkVersion` has been bumped to `25.2.9519653` - `cmakeVersion` has been bumped to `3.22.1` - `kotlinVersion` has been bumped to `1.7.22` - `AGP` has been bumped to `7.4.2` - `Gradle` has been upgraded to `8.0.1` - Android `CompileSDK` and `TargetSDK` have been bumped to 33 - `@react-native-async-storage/async-storage` has been upgraded to `1.19.3` - `@walletconnect/client` has been nuked - some of the old `react-native-reanimated` code has been nuked - `react-native-keychain` fork has been replaced with `8.1.2` - On Android we are currently relying on `Hermes` Engine. - On iOS we are currently relying on `JSC` - We are not enabling new architecture for now (I have plans for that in the future) ref: https://github.com/status-im/status-mobile/issues/18138 IOS only PR : https://github.com/status-im/status-mobile/pull/16721 Android only PR : https://github.com/status-im/status-mobile/pull/17062 - `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
88 lines
2.6 KiB
Java
88 lines
2.6 KiB
Java
package im.status.ethereum;
|
|
|
|
import androidx.multidex.MultiDexApplication;
|
|
import android.webkit.WebView;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import com.facebook.react.PackageList;
|
|
|
|
import com.facebook.react.ReactApplication;
|
|
import cl.json.RNSharePackage;
|
|
import com.facebook.react.ReactNativeHost;
|
|
import com.reactnativenavigation.NavigationApplication;
|
|
import com.reactnativenavigation.react.NavigationReactNativeHost;
|
|
import com.facebook.react.ReactPackage;
|
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
import com.facebook.react.modules.network.OkHttpClientProvider;
|
|
import com.reactnativecommunity.blurview.BlurViewPackage;
|
|
|
|
import java.util.List;
|
|
|
|
import im.status.ethereum.keycard.RNStatusKeycardPackage;
|
|
import im.status.ethereum.module.StatusPackage;
|
|
import im.status.ethereum.pushnotifications.PushNotificationPackage;
|
|
import im.status.ethereum.StatusOkHttpClientFactory;
|
|
|
|
import com.facebook.react.bridge.JSIModulePackage;
|
|
|
|
public class MainApplication extends NavigationApplication {
|
|
|
|
private final ReactNativeHost mReactNativeHost = new NavigationReactNativeHost(this) {
|
|
@Override
|
|
public boolean getUseDeveloperSupport() {
|
|
return BuildConfig.DEBUG;
|
|
}
|
|
|
|
@Override
|
|
protected List<ReactPackage> getPackages() {
|
|
|
|
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
|
|
|
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
packages.add(statusPackage);
|
|
packages.add(new RNStatusKeycardPackage());
|
|
packages.add(new PushNotificationPackage());
|
|
packages.add(new BlurViewPackage());
|
|
return packages;
|
|
}
|
|
|
|
@Override
|
|
protected String getJSMainModuleName() {
|
|
return "index";
|
|
}
|
|
|
|
|
|
@Override
|
|
protected boolean isNewArchEnabled() {
|
|
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
}
|
|
|
|
@Override
|
|
protected Boolean isHermesEnabled() {
|
|
return BuildConfig.IS_HERMES_ENABLED;
|
|
}
|
|
|
|
};
|
|
|
|
|
|
@Override
|
|
public ReactNativeHost getReactNativeHost() {
|
|
return mReactNativeHost;
|
|
}
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
super.onCreate();
|
|
|
|
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
|
|
|
|
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
|
|
|
|
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
DefaultNewArchitectureEntryPoint.load();
|
|
}
|
|
|
|
}
|
|
|
|
}
|