Skip to content

Commit

Permalink
Merge pull request #30905 from software-mansion-labs/expo-image
Browse files Browse the repository at this point in the history
Expo image
  • Loading branch information
roryabraham authored Dec 22, 2023
2 parents 3480969 + 7c4ef3f commit 9c46375
Show file tree
Hide file tree
Showing 135 changed files with 52,333 additions and 37,101 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@ yalc.lock

# Local https certificate/key
config/webpack/*.pem

# Expo
.expo
dist/
web-build/
5 changes: 5 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
//
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
}

project.ext.envConfigFiles = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.expensify.chat;
import expo.modules.ReactActivityDelegateWrapper;

import android.os.Bundle;
import android.content.pm.ActivityInfo;
Expand Down Expand Up @@ -31,11 +32,11 @@ protected String getMainComponentName() {
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new DefaultReactActivityDelegate(
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled());
DefaultNewArchitectureEntryPoint.getFabricEnabled()));
}

@Override
Expand Down
16 changes: 13 additions & 3 deletions android/app/src/main/java/com/expensify/chat/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package com.expensify.chat;
import android.content.res.Configuration;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;

import android.content.Context;
import android.database.CursorWindow;
Expand All @@ -22,7 +25,7 @@

public class MainApplication extends MultiDexApplication implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new DefaultReactNativeHost(this) {
new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
Expand All @@ -43,7 +46,7 @@ protected List<ReactPackage> getPackages() {

@Override
protected String getJSMainModuleName() {
return "index";
return ".expo/.virtual-metro-entry";
}

@Override
Expand All @@ -55,7 +58,7 @@ protected boolean isNewArchEnabled() {
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
});

@Override
public ReactNativeHost getReactNativeHost() {
Expand Down Expand Up @@ -94,5 +97,12 @@ public void onCreate() {
} catch (Exception e) {
e.printStackTrace();
}
ApplicationLifecycleDispatcher.onApplicationCreate(this);
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
}
}
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
androidXCore = "1.0.2"
multiDexEnabled = true
googlePlayServicesVersion = "17.0.0"
kotlinVersion = '1.6.20'
kotlinVersion = '1.8.10'

// This property configures the type of Mapbox SDK used by the @rnmapbox/maps library.
// "mapbox" indicates the usage of the Mapbox SDK.
Expand Down
3 changes: 3 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ includeBuild('../node_modules/react-native') {
substitute(module("com.facebook.react:hermes-engine")).using(project(":packages:react-native:ReactAndroid:hermes-engine"))
}
}

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
4 changes: 2 additions & 2 deletions assets/emojis/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SvgProps} from 'react-native-svg';
import IconAsset from '@src/types/utils/IconAsset';

type Emoji = {
code: string;
Expand All @@ -8,7 +8,7 @@ type Emoji = {

type HeaderEmoji = {
header: true;
icon: React.FC<SvgProps>;
icon: IconAsset;
code: string;
};

Expand Down
2 changes: 1 addition & 1 deletion assets/images/expensify-logo--adhoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/expensify-logo--dev.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9c46375

Please sign in to comment.