Skip to content

Commit cfe556a

Browse files
authored
Merge pull request #18507 from fabioh8010/feature/rn-update-0.72
Update App to React Native 0.72 version
2 parents cf4e837 + 72a3520 commit cfe556a

34 files changed

Lines changed: 6616 additions & 4264 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ build/
3333
.gradle
3434
local.properties
3535
*.iml
36-
android/*.hprof
36+
*.hprof
3737
android/app/src/main/java/com/expensify/chat/generated/
3838
.cxx/
3939

@@ -96,5 +96,8 @@ storybook-static
9696
tests/e2e/results/
9797
.reassure
9898

99+
# Temporary files created by Metro to check the health of the file watcher
100+
.metro-health-check*
101+
99102
# Typescript
100103
tsconfig.tsbuildinfo

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
source "https://rubygems.org"
22

3-
gem "cocoapods", "~> 1.11.3"
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby ">= 2.6.10"
5+
6+
gem "cocoapods", "~> 1.12"
47
gem "fastlane", "~> 2"
58
gem "xcpretty", "~> 0"
69

Gemfile.lock

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ GEM
3636
aws-eventstream (~> 1, >= 1.0.2)
3737
babosa (1.0.4)
3838
claide (1.1.0)
39-
cocoapods (1.11.3)
39+
cocoapods (1.12.1)
4040
addressable (~> 2.8)
4141
claide (>= 1.0.2, < 2.0)
42-
cocoapods-core (= 1.11.3)
42+
cocoapods-core (= 1.12.1)
4343
cocoapods-deintegrate (>= 1.0.3, < 2.0)
44-
cocoapods-downloader (>= 1.4.0, < 2.0)
44+
cocoapods-downloader (>= 1.6.0, < 2.0)
4545
cocoapods-plugins (>= 1.0.0, < 2.0)
4646
cocoapods-search (>= 1.0.0, < 2.0)
47-
cocoapods-trunk (>= 1.4.0, < 2.0)
47+
cocoapods-trunk (>= 1.6.0, < 2.0)
4848
cocoapods-try (>= 1.1.0, < 2.0)
4949
colored2 (~> 3.1)
5050
escape (~> 0.0.4)
5151
fourflusher (>= 2.3.0, < 3.0)
5252
gh_inspector (~> 1.0)
5353
molinillo (~> 0.8.0)
5454
nap (~> 1.0)
55-
ruby-macho (>= 1.0, < 3.0)
55+
ruby-macho (>= 2.3.0, < 3.0)
5656
xcodeproj (>= 1.21.0, < 2.0)
57-
cocoapods-core (1.11.3)
58-
activesupport (>= 5.0, < 7)
57+
cocoapods-core (1.12.1)
58+
activesupport (>= 5.0, < 8)
5959
addressable (~> 2.8)
6060
algoliasearch (~> 1.0)
6161
concurrent-ruby (~> 1.1)
@@ -207,7 +207,7 @@ GEM
207207
http-cookie (1.0.5)
208208
domain_name (~> 0.5)
209209
httpclient (2.8.3)
210-
i18n (1.12.0)
210+
i18n (1.13.0)
211211
concurrent-ruby (~> 1.0)
212212
jmespath (1.6.1)
213213
json (2.6.3)
@@ -280,7 +280,7 @@ GEM
280280
rouge (~> 2.0.7)
281281
xcpretty-travis-formatter (1.0.1)
282282
xcpretty (~> 0.2, >= 0.0.7)
283-
zeitwerk (2.6.7)
283+
zeitwerk (2.6.8)
284284

285285
PLATFORMS
286286
arm64-darwin-21
@@ -290,10 +290,13 @@ PLATFORMS
290290
x86_64-linux
291291

292292
DEPENDENCIES
293-
cocoapods (~> 1.11.3)
293+
cocoapods (~> 1.12)
294294
fastlane (~> 2)
295295
fastlane-plugin-aws_s3
296296
xcpretty (~> 0)
297297

298+
RUBY VERSION
299+
ruby 2.6.10p210
300+
298301
BUNDLED WITH
299302
2.1.4

android/app/build.gradle

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ apply plugin: "com.facebook.react"
33
apply plugin: "com.google.firebase.firebase-perf"
44
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
55

6-
import com.android.build.OutputFile
7-
86
/**
97
* This is the configuration block to customize your React Native Android app.
108
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -15,8 +13,8 @@ react {
1513
// root = file("../")
1614
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
1715
// reactNativeDir = file("../node_modules/react-native")
18-
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
19-
// codegenDir = file("../node_modules/react-native-codegen")
16+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
17+
// codegenDir = file("../node_modules/@react-native/codegen")
2018
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
2119
// cliFile = file("../node_modules/react-native/cli.js")
2220

@@ -59,14 +57,6 @@ project.ext.envConfigFiles = [
5957
release: ".env.production",
6058
]
6159

62-
/**
63-
* Set this to true to create four separate APKs instead of one,
64-
* one for each native architecture. This is useful if you don't
65-
* use App Bundles (https://developer.android.com/guide/app-bundle/)
66-
* and want to have separate APKs to upload to the Play Store.
67-
*/
68-
def enableSeparateBuildPerCPUArchitecture = false
69-
7060
/**
7161
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
7262
*/
@@ -85,16 +75,6 @@ def enableProguardInReleaseBuilds = false
8575
*/
8676
def jscFlavor = 'org.webkit:android-jsc:+'
8777

88-
/**
89-
* Private function to get the list of Native Architectures you want to build.
90-
* This reads the value from reactNativeArchitectures in your gradle.properties
91-
* file and works together with the --active-arch-only flag of react-native run-android.
92-
*/
93-
def reactNativeArchitectures() {
94-
def value = project.getProperties().get("reactNativeArchitectures")
95-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
96-
}
97-
9878
android {
9979
ndkVersion rootProject.ext.ndkVersion
10080

@@ -110,14 +90,6 @@ android {
11090
versionName "1.3.49-1"
11191
}
11292

113-
splits {
114-
abi {
115-
reset()
116-
enable enableSeparateBuildPerCPUArchitecture
117-
universalApk false // If true, also generate a universal APK
118-
include (*reactNativeArchitectures())
119-
}
120-
}
12193
signingConfigs {
12294
release {
12395
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
@@ -155,27 +127,11 @@ android {
155127
signingConfig signingConfigs.debug
156128
}
157129
}
158-
159-
// applicationVariants are e.g. debug, release
160-
applicationVariants.all { variant ->
161-
variant.outputs.each { output ->
162-
// For each separate APK per architecture, set a unique version code as described here:
163-
// https://developer.android.com/studio/build/configure-apk-splits.html
164-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
165-
def abi = output.getFilter(OutputFile.ABI)
166-
if (abi != null) { // null for the universal-debug, universal-release variants
167-
output.versionCodeOverride =
168-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
169-
}
170-
171-
}
172-
}
173130
}
174131

175132
dependencies {
176133
// The version of react-native is set by the React Native Gradle Plugin
177134
implementation("com.facebook.react:react-android")
178-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
179135
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
180136

181137
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {

android/app/src/main/java/com/expensify/chat/MainActivity.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ protected ReactActivityDelegate createReactActivityDelegate() {
3535
this,
3636
getMainComponentName(),
3737
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
38-
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
39-
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
40-
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
41-
);
38+
DefaultNewArchitectureEntryPoint.getFabricEnabled());
4239
}
4340

4441
@Override

android/app/src/main/res/drawable/rn_edit_text_material.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
2121

2222
<selector>
23-
<!--
23+
<!--
2424
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
2525
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
2626
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ buildscript {
2020
mavenCentral()
2121
}
2222
dependencies {
23-
classpath("com.android.tools.build:gradle:7.3.1")
23+
classpath("com.android.tools.build:gradle")
2424
classpath("com.facebook.react:react-native-gradle-plugin")
2525
classpath("com.google.gms:google-services:4.3.4")
2626
classpath("com.google.firebase:firebase-crashlytics-gradle:2.7.1")

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AsyncStorage_db_size_in_MB=10
2929
AsyncStorage_useNextStorage=true
3030

3131
# Version of flipper SDK to use with React Native
32-
FLIPPER_VERSION=0.125.0
32+
FLIPPER_VERSION=0.182.0
3333

3434
# Use this property to specify which architecture you want to build.
3535
# You can also override it from the CLI using

0 commit comments

Comments
 (0)