Skip to content

Commit 157dbd4

Browse files
Update expo and remove expo-updates
1 parent 44cae7b commit 157dbd4

File tree

69 files changed

+2390
-3473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2390
-3473
lines changed

.circleci/android_sdk_checksum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6821609e885d4b68f4066751949a9211f4196ab36df9d63f7a5f9037ca64e2d6 android-commandline.zip
1+
2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258 android-commandline.zip

.circleci/config.yml

+18-50
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,55 @@ orbs:
55
node: circleci/node@5.1.0
66

77
executors:
8-
apple-ci-arm-medium:
9-
macos:
10-
xcode: 14.3.1
11-
resource_class: macos.m1.medium.gen1
8+
linux:
9+
machine:
10+
image: ubuntu-2404:current
1211

1312
commands:
1413
install_android_sdk:
15-
description: "Install Android SDK in macOS machine"
14+
description: "Install Android SDK"
1615
steps:
17-
- run: brew install wget
18-
- run: wget --quiet --output-document="$HOME/android-commandline.zip" https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip
16+
- run: wget --quiet --output-document="$HOME/android-commandline.zip" https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
1917
- run: (cp .circleci/android_sdk_checksum $HOME/checksum; cd $HOME; shasum -a256 -c checksum)
2018
- run: set +o pipefail
2119
- run: unzip "$HOME/android-commandline.zip" -d "$HOME"
2220
- run: mkdir "$HOME/android-sdk"
23-
- run: echo y | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" "platforms;android-33" > /dev/null
21+
- run: echo y | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" "platforms;android-35" > /dev/null
2422
- run: echo y | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" "platform-tools" > /dev/null
25-
- run: echo y | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" "build-tools;33.0.2" > /dev/null
23+
- run: echo y | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" "build-tools;35.0.0" > /dev/null
2624
- run: (yes || true) | $HOME/cmdline-tools/bin/sdkmanager --sdk_root="$HOME/android-sdk" --licenses
2725
- run: echo 'export ANDROID_HOME="$HOME/android-sdk"' >> "$BASH_ENV"
2826
- run: set -o pipefail
2927

30-
jobs:
3128
setup:
32-
executor: apple-ci-arm-medium
29+
description: "Setup project for security scan"
3330
steps:
3431
- checkout
35-
- node/install:
36-
install-yarn: true
37-
node-version: 'latest'
3832
- install_android_sdk
39-
- run: brew install git-lfs
40-
- run: git lfs install
41-
- run: git lfs pull
4233
- run: yarn install --frozen-lockfile
43-
- run: yarn build
44-
- run: gem install cocoapods
34+
- run: (cd android; ./gradlew assembleDebug) # Avoid gradle build during snyk scan
4535
- run: (cd e2e; yarn install --frozen-lockfile)
46-
- run: (cd android; ./gradlew assembleDebug)
47-
- run: (cd dist; yarn install)
48-
- run: (cd dist/android; ./gradlew assembleDebug)
49-
- run: (cd e2e/android; echo "signInRedirectUri=com.example.redirect:/login" > okta.properties; ./gradlew assembleDebug)
50-
- run: (cd ios; pod install)
51-
- run: (cd e2e/ios; pod install)
52-
- persist_to_workspace:
53-
root: ~/project
54-
paths:
55-
- .
36+
- run: (cd e2e/android; echo "signInRedirectUri=com.example.redirect:/login" > okta.properties; ./gradlew assembleDebug) # Avoid gradle build during snyk scan
5637

38+
jobs:
5739
snyk-scan:
58-
executor: apple-ci-arm-medium
40+
executor: linux
5941
steps:
60-
- attach_workspace:
61-
at: ~/project
62-
- run:
63-
name: Install rosetta # Needed for snyk to work on M1 machines.
64-
command: softwareupdate --install-rosetta --agree-to-license
65-
- install_android_sdk
42+
- setup
43+
- run: pip install setuptools
6644
- general-platform-helpers/step-load-dependencies
6745
- general-platform-helpers/step-run-snyk-monitor:
6846
run-on-non-main: true
69-
scan-all-projects: true
70-
skip-unresolved: false
71-
os: macos
72-
additional-arguments: --prune-repeated-subdependencies
47+
additional-arguments: --exclude=dist
7348

7449
workflows:
7550
security-scan:
7651
jobs:
77-
- setup:
78-
filters:
79-
branches:
80-
only:
81-
- master
8252
- snyk-scan:
8353
name: execute-snyk
8454
context:
8555
- static-analysis
8656
filters:
87-
branches:
88-
only:
89-
- master
90-
requires:
91-
- setup
57+
branches:
58+
only:
59+
- master

android/forceVersions.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ def forceVersions(ConfigurationContainer configurations) {
22
configurations.configureEach { configuration ->
33
configuration.resolutionStrategy {
44
force 'org.bouncycastle:bcprov-jdk18on:1.78.1'
5-
force 'io.netty:netty-handler:4.1.108.Final'
6-
force 'io.netty:netty-codec-http:4.1.108.Final'
5+
force 'io.netty:netty-handler:4.1.118.Final'
6+
force 'io.netty:netty-codec-http:4.1.118.Final'
7+
force 'io.netty:netty-codec-http2:4.1.118.Final'
8+
force 'com.google.protobuf:protobuf-java:4.29.3'
79
}
810
}
911
}

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12-
org.gradle.jvmargs=-Xmx1536m
12+
org.gradle.jvmargs=-Xmx2048m
1313

1414
# When configured, Gradle will run in incubating parallel mode.
1515
# This option should only be used with decoupled projects. More details, visit
-9 Bytes
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew.bat

+10-10
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

e2e/android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build/
1010
local.properties
1111
*.iml
1212
*.hprof
13+
.cxx/
1314

1415
# Bundle artifacts
1516
*.jsbundle

e2e/android/app/build.gradle

+26-25
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ react {
2020
bundleCommand = "export:embed"
2121

2222
/* Folders */
23-
// The root of your project, i.e. where "package.json" lives. Default is '..'
24-
// root = file("../")
25-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
26-
// reactNativeDir = file("../node_modules/react-native")
27-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
28-
// codegenDir = file("../node_modules/@react-native/codegen")
23+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
24+
// root = file("../../")
25+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
26+
// reactNativeDir = file("../../node_modules/react-native")
27+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
28+
// codegenDir = file("../../node_modules/@react-native/codegen")
2929

3030
/* Variants */
3131
// The list of variants to that are debuggable. For those we're going to
@@ -57,6 +57,9 @@ react {
5757
//
5858
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5959
// hermesFlags = ["-O", "-output-source-map"]
60+
61+
/* Autolinking */
62+
autolinkLibrariesWithApp()
6063
}
6164

6265
/**
@@ -122,9 +125,17 @@ android {
122125
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
123126
minifyEnabled enableProguardInReleaseBuilds
124127
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
128+
crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true)
125129
}
126130
}
127-
131+
packagingOptions {
132+
jniLibs {
133+
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
134+
}
135+
}
136+
androidResources {
137+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
138+
}
128139
testOptions {
129140
animationsDisabled true
130141

@@ -155,34 +166,27 @@ android {
155166
dependencies {
156167
// The version of react-native is set by the React Native Gradle Plugin
157168
implementation("com.facebook.react:react-android")
158-
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
159-
implementation 'com.squareup.okio:okio:3.5.0'
160-
implementation 'com.squareup.okio:okio-jvm:3.5.0'
161-
implementation 'commons-fileupload:commons-fileupload:1.5'
162-
implementation 'com.google.guava:guava:32.1.3-android'
169+
implementation libs.okhttp
170+
implementation libs.okio
171+
implementation libs.okio.jvm
172+
implementation libs.commons.fileupload
173+
implementation libs.guava
163174

164175
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
165176
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
166177
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
167-
def frescoVersion = rootProject.ext.frescoVersion
168-
169-
// If your app supports Android versions before Ice Cream Sandwich (API level 14)
170-
if (isGifEnabled || isWebpEnabled) {
171-
implementation("com.facebook.fresco:fresco:${frescoVersion}")
172-
implementation("com.facebook.fresco:imagepipeline-okhttp3:${frescoVersion}")
173-
}
174178

175179
if (isGifEnabled) {
176180
// For animated gif support
177-
implementation("com.facebook.fresco:animated-gif:${frescoVersion}")
181+
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
178182
}
179183

180184
if (isWebpEnabled) {
181185
// For webp support
182-
implementation("com.facebook.fresco:webpsupport:${frescoVersion}")
186+
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
183187
if (isWebpAnimatedEnabled) {
184188
// Animated webp support
185-
implementation("com.facebook.fresco:animated-webp:${frescoVersion}")
189+
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
186190
}
187191
}
188192

@@ -201,9 +205,6 @@ dependencies {
201205
}
202206
}
203207

204-
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
205-
applyNativeModulesAppBuildGradle(project)
206-
207208
static def parseScheme(String uri) {
208209
def index = uri.indexOf(':/')
209210
if (index == -1) {

e2e/android/app/src/main/AndroidManifest.xml

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
<data android:scheme="https"/>
1212
</intent>
1313
</queries>
14-
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme">
14+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true">
1515
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
16-
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="50.0.0"/>
1716
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
1817
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
19-
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
18+
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
2019
<intent-filter>
2120
<action android:name="android.intent.action.MAIN"/>
2221
<category android:name="android.intent.category.LAUNCHER"/>
@@ -28,6 +27,5 @@
2827
<data android:scheme="com.e2eoktareactnative"/>
2928
</intent-filter>
3029
</activity>
31-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
3230
</application>
33-
</manifest>
31+
</manifest>

e2e/android/app/src/main/java/com/e2eoktareactnative/MainActivity.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.e2eoktareactnative
2+
import expo.modules.splashscreen.SplashScreenManager
23

34
import android.os.Build
45
import android.os.Bundle
@@ -15,7 +16,10 @@ class MainActivity : ReactActivity() {
1516
// Set the theme to AppTheme BEFORE onCreate to support
1617
// coloring the background, status bar, and navigation bar.
1718
// This is required for expo-splash-screen.
18-
setTheme(R.style.AppTheme);
19+
// setTheme(R.style.AppTheme);
20+
// @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY) sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af
21+
SplashScreenManager.registerOnActivity(this)
22+
// @generated end expo-splashscreen
1923
super.onCreate(null)
2024
}
2125

Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
11
package com.e2eoktareactnative
22

33
import android.app.Application
4+
import android.content.res.Configuration
45

56
import com.facebook.react.PackageList
67
import com.facebook.react.ReactApplication
78
import com.facebook.react.ReactNativeHost
89
import com.facebook.react.ReactPackage
910
import com.facebook.react.ReactHost
1011
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
11-
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1212
import com.facebook.react.defaults.DefaultReactNativeHost
13+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1314
import com.facebook.soloader.SoLoader
1415

16+
import expo.modules.ApplicationLifecycleDispatcher
17+
import expo.modules.ReactNativeHostWrapper
1518

1619
class MainApplication : Application(), ReactApplication {
17-
override val reactNativeHost: ReactNativeHost =
18-
object : DefaultReactNativeHost(this) {
19-
override fun getPackages(): List<ReactPackage> =
20-
PackageList(this).packages.apply {
21-
// Packages that cannot be autolinked yet can be added manually here, for example:
22-
// add(MyReactNativePackage())
23-
}
2420

25-
override fun getJSMainModuleName(): String = "index"
21+
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
22+
this,
23+
object : DefaultReactNativeHost(this) {
24+
override fun getPackages(): List<ReactPackage> {
25+
val packages = PackageList(this).packages
26+
// Packages that cannot be autolinked yet can be added manually here, for example:
27+
// packages.add(new MyReactNativePackage());
28+
return packages
29+
}
2630

27-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
31+
override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"
2832

29-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
30-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
31-
}
33+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
34+
35+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
36+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
37+
}
38+
)
3239

3340
override val reactHost: ReactHost
34-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
41+
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)
3542

3643
override fun onCreate() {
3744
super.onCreate()
38-
SoLoader.init(this, false)
45+
SoLoader.init(this, OpenSourceMergedSoMapping)
3946
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4047
// If you opted-in for the New Architecture, we load the native entry point for this app.
4148
load()
4249
}
50+
ApplicationLifecycleDispatcher.onApplicationCreate(this)
51+
}
52+
53+
override fun onConfigurationChanged(newConfig: Configuration) {
54+
super.onConfigurationChanged(newConfig)
55+
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
4356
}
4457
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)