Skip to content

Commit

Permalink
chore: expo update
Browse files Browse the repository at this point in the history
  • Loading branch information
stackchain committed Nov 5, 2024
1 parent 18d5ad9 commit d0dd6a7
Show file tree
Hide file tree
Showing 13 changed files with 2,227 additions and 119 deletions.
7 changes: 7 additions & 0 deletions apps/wallet/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

// EXPO
// Bundle with Expo CLI
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"
// END EXPO
}

/**
Expand Down
10 changes: 8 additions & 2 deletions apps/wallet/android/app/src/main/java/com/yoroi/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.yoroi

// EXPO
import expo.modules.ReactActivityDelegateWrapper
// END EXPO

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
Expand All @@ -17,6 +21,8 @@ class MainActivity : ReactActivity() {
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
// EXPO
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))
// END EXPO
}
42 changes: 30 additions & 12 deletions apps/wallet/android/app/src/main/java/com/yoroi/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package com.yoroi

// EXPO
import android.content.res.Configuration
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
// END EXPO

import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
Expand All @@ -13,24 +19,26 @@ import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {

// EXPO - ReactNativeHostWrapper // getDefaultReactHost
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
ReactNativeHostWrapper(this, object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}

override fun getJSMainModuleName(): String = "index"
override fun getJSMainModuleName(): String = "index"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
})

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)
// END EXPO

override fun onCreate() {
super.onCreate()
Expand All @@ -39,5 +47,15 @@ class MainApplication : Application(), ReactApplication {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
// EXPO
ApplicationLifecycleDispatcher.onApplicationCreate(this)
// END EXPO
}

// EXPO
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
// END EXPO
}
5 changes: 5 additions & 0 deletions apps/wallet/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ rootProject.name = 'yoroi'
apply from: file('../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle'); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../../../node_modules/@react-native/gradle-plugin')

// EXPO
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
// END EXPO
15 changes: 15 additions & 0 deletions apps/wallet/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# EXPO
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# END EXPO

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
Expand All @@ -15,6 +19,17 @@ if linkage != nil
end

target 'yoroi' do
# EXPO
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
# END EXPO

config = use_native_modules!

use_react_native!(
Expand Down
183 changes: 182 additions & 1 deletion apps/wallet/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,94 @@ PODS:
- React-Core
- boost (1.83.0)
- DoubleConversion (1.1.6)
- EXApplication (5.3.1):
- ExpoModulesCore
- EXBarCodeScanner (12.3.2):
- EXImageLoader
- ExpoModulesCore
- ZXingObjC/OneD
- ZXingObjC/PDF417
- EXConstants (14.4.2):
- ExpoModulesCore
- EXFileSystem (15.4.5):
- ExpoModulesCore
- EXFont (11.4.0):
- ExpoModulesCore
- EXImageLoader (4.1.1):
- ExpoModulesCore
- React-Core
- Expo (49.0.23):
- ExpoModulesCore
- ExpoBackgroundFetch (11.8.1):
- ExpoModulesCore
- ExpoBlur (12.9.2):
- ExpoModulesCore
- ExpoCamera (13.9.0):
- ExpoModulesCore
- ZXingObjC/OneD
- ZXingObjC/PDF417
- ExpoImage (1.3.0):
- ExpoModulesCore
- SDWebImage (~> 5.15.8)
- SDWebImageAVIFCoder (~> 0.10.0)
- SDWebImageSVGCoder (~> 1.7.0)
- SDWebImageWebPCoder (~> 0.11.0)
- ExpoKeepAwake (12.3.0):
- ExpoModulesCore
- ExpoModulesCore (1.5.13):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTAppDelegate
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- ExpoSystemUI (2.2.1):
- ExpoModulesCore
- EXTaskManager (11.7.3):
- ExpoModulesCore
- UMAppLoader
- FBLazyVector (0.74.4)
- fmt (9.1.0)
- glog (0.3.5)
- hermes-engine (0.74.4):
- hermes-engine/Pre-built (= 0.74.4)
- hermes-engine/Pre-built (0.74.4)
- libaom (3.0.0):
- libvmaf (>= 2.2.0)
- libavif (0.11.1):
- libavif/libaom (= 0.11.1)
- libavif/core (0.11.1)
- libavif/libaom (0.11.1):
- libaom (>= 2.0.0)
- libavif/core
- libvmaf (2.3.1)
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.3.2):
- libwebp/demux
- libwebp/sharpyuv (1.3.2)
- libwebp/webp (1.3.2):
- libwebp/sharpyuv
- RCT-Folly (2024.01.01.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -1377,13 +1459,45 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SDWebImage (5.15.8):
- SDWebImage/Core (= 5.15.8)
- SDWebImage/Core (5.15.8)
- SDWebImageAVIFCoder (0.10.1):
- libavif (>= 0.11.0)
- SDWebImage (~> 5.10)
- SDWebImageSVGCoder (1.7.0):
- SDWebImage/Core (~> 5.6)
- SDWebImageWebPCoder (0.11.0):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.15)
- SocketRocket (0.7.0)
- UMAppLoader (4.5.1)
- Yoga (0.0.0)
- ZXingObjC/Core (3.6.9)
- ZXingObjC/OneD (3.6.9):
- ZXingObjC/Core
- ZXingObjC/PDF417 (3.6.9):
- ZXingObjC/Core

DEPENDENCIES:
- "amplitude-react-native (from `../../../node_modules/@amplitude/analytics-react-native`)"
- boost (from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXApplication (from `../../../node_modules/expo-application/ios`)
- EXBarCodeScanner (from `../../../node_modules/expo-barcode-scanner/ios`)
- EXConstants (from `../../../node_modules/expo-constants/ios`)
- EXFileSystem (from `../../../node_modules/expo-file-system/ios`)
- EXFont (from `../../../node_modules/expo-font/ios`)
- EXImageLoader (from `../../../node_modules/expo-image-loader/ios`)
- Expo (from `../../../node_modules/expo`)
- ExpoBackgroundFetch (from `../../../node_modules/expo-background-fetch/ios`)
- ExpoBlur (from `../../../node_modules/expo-blur/ios`)
- ExpoCamera (from `../../../node_modules/expo-camera/ios`)
- ExpoImage (from `../../../node_modules/expo-image/ios`)
- ExpoKeepAwake (from `../../../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../../../node_modules/expo-modules-core`)
- ExpoSystemUI (from `../../../node_modules/expo-system-ui/ios`)
- EXTaskManager (from `../../../node_modules/expo-task-manager/ios`)
- FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`)
- fmt (from `../../../node_modules/react-native/third-party-podspecs/fmt.podspec`)
- glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`)
Expand Down Expand Up @@ -1450,11 +1564,21 @@ DEPENDENCIES:
- RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`)
- RNKeychain (from `../../../node_modules/react-native-keychain`)
- RNScreens (from `../../../node_modules/react-native-screens`)
- UMAppLoader (from `../../../node_modules/unimodules-app-loader/ios`)
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- libaom
- libavif
- libvmaf
- libwebp
- SDWebImage
- SDWebImageAVIFCoder
- SDWebImageSVGCoder
- SDWebImageWebPCoder
- SocketRocket
- ZXingObjC

EXTERNAL SOURCES:
amplitude-react-native:
Expand All @@ -1463,6 +1587,36 @@ EXTERNAL SOURCES:
:podspec: "../../../node_modules/react-native/third-party-podspecs/boost.podspec"
DoubleConversion:
:podspec: "../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXApplication:
:path: "../../../node_modules/expo-application/ios"
EXBarCodeScanner:
:path: "../../../node_modules/expo-barcode-scanner/ios"
EXConstants:
:path: "../../../node_modules/expo-constants/ios"
EXFileSystem:
:path: "../../../node_modules/expo-file-system/ios"
EXFont:
:path: "../../../node_modules/expo-font/ios"
EXImageLoader:
:path: "../../../node_modules/expo-image-loader/ios"
Expo:
:path: "../../../node_modules/expo"
ExpoBackgroundFetch:
:path: "../../../node_modules/expo-background-fetch/ios"
ExpoBlur:
:path: "../../../node_modules/expo-blur/ios"
ExpoCamera:
:path: "../../../node_modules/expo-camera/ios"
ExpoImage:
:path: "../../../node_modules/expo-image/ios"
ExpoKeepAwake:
:path: "../../../node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../../../node_modules/expo-modules-core"
ExpoSystemUI:
:path: "../../../node_modules/expo-system-ui/ios"
EXTaskManager:
:path: "../../../node_modules/expo-task-manager/ios"
FBLazyVector:
:path: "../../../node_modules/react-native/Libraries/FBLazyVector"
fmt:
Expand Down Expand Up @@ -1592,17 +1746,38 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/react-native-keychain"
RNScreens:
:path: "../../../node_modules/react-native-screens"
UMAppLoader:
:path: "../../../node_modules/unimodules-app-loader/ios"
Yoga:
:path: "../../../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
amplitude-react-native: 1ea3d5e1f80ccc357dd178c55c29e51c89f1cd11
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
EXApplication: 042aa2e3f05258a16962ea1a9914bf288db9c9a1
EXBarCodeScanner: 8e23fae8d267dbef9f04817833a494200f1fce35
EXConstants: ce5bbea779da8031ac818c36bea41b10e14d04e1
EXFileSystem: f8b838a880254de42a5a7da20ed5ce12e2697c1b
EXFont: 738c44c390953ebcbab075a4848bfbef025fd9ee
EXImageLoader: fd053169a8ee932dd83bf1fe5487a50c26d27c2b
Expo: ba9abdf444dc6d2c05a82c4c1b51a2400beb6167
ExpoBackgroundFetch: 80d41ec15c6cce0bafb5d2326b8e85f42152eba7
ExpoBlur: e832d874bd94afc0645daddbd3162ec1ce172080
ExpoCamera: c13580cc0964c9e462f76579a0de9f468a9c6e73
ExpoImage: bf714e0101812ccbbd1a4fdbfd34905feeefd9f5
ExpoKeepAwake: be4cbd52d9b177cde0fd66daa1913afa3161fc1d
ExpoModulesCore: 34e6a08e7f7bc02fa526126d2d0609b22aa5009c
ExpoSystemUI: 0be5173ee2a7c01e9abc44f56d879a1eaaa16527
EXTaskManager: 07d427a5213dd275c13b6b6c07bba35a672e6698
FBLazyVector: 4c674c2d53de79c145d6a723910543d7b57ed74c
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
hermes-engine: 6312f669c895e05f0f6029554061593711770ea6
libaom: 144606b1da4b5915a1054383c3a4459ccdb3c661
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
libvmaf: 27f523f1e63c694d14d534cd0fddd2fab0ae8711
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
RCTDeprecation: d83da85890d5bb18efd2809a733865c1c5c11487
RCTRequired: e109419eacfb10fbb79a3ecb57ebcad198593d8a
Expand Down Expand Up @@ -1663,9 +1838,15 @@ SPEC CHECKSUMS:
RNGestureHandler: 6052baad2e62bea8af061803c1408c30a5bdbb5e
RNKeychain: f75b8c8b2f17d3b2aa1f25b4a0ac5b83d947ff8f
RNScreens: d3d50aa84db4541eee00fbb1f32151030f56c510
SDWebImage: cb032eba469c54e0000e78bcb0a13cdde0a52798
SDWebImageAVIFCoder: 8348fef6d0ec69e129c66c9fe4d74fbfbf366112
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
UMAppLoader: 79d3ee6aa2447a1fe2e8b0d07acf2de106e55b58
Yoga: 0efb3e1bd40ba59b009f01badea863281101de78
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: 1cb59716ff69665a92322812d5e147c6ee4713b2
PODFILE CHECKSUM: 15d39dfcd4ea663b4d672b1a12cd8c45bbc26728

COCOAPODS: 1.14.3
Loading

0 comments on commit d0dd6a7

Please sign in to comment.