From fb839b2188468822a84eca5435b8088b753ed91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Fri, 5 May 2023 21:06:43 +0100 Subject: [PATCH 01/30] Initial changes to use Expensify's 0.72.0-rc.1-alpha.0 RN version --- .gitignore | 5 +- .ruby-version | 1 - .watchmanconfig | 1 + Gemfile | 5 +- android/app/build.gradle | 47 +- .../java/com/expensify/chat/MainActivity.java | 5 +- .../res/drawable/rn_edit_text_material.xml | 2 +- android/build.gradle | 2 +- android/gradle.properties | 2 +- android/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 61574 bytes .../gradle/wrapper/gradle-wrapper.properties | 3 +- android/gradlew | 20 +- android/gradlew.bat | 37 +- android/settings.gradle | 2 +- ios/NewExpensify/AppDelegate.mm | 13 - ios/Podfile | 14 +- metro.config.js | 4 +- package-lock.json | 12224 +++++----------- package.json | 10 +- 19 files changed, 4012 insertions(+), 8385 deletions(-) delete mode 100644 .ruby-version create mode 100644 .watchmanconfig diff --git a/.gitignore b/.gitignore index 8265d5fd272..3aad6c44ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ build/ .gradle local.properties *.iml -android/*.hprof +*.hprof android/app/src/main/java/com/expensify/chat/generated/ .cxx/ @@ -94,3 +94,6 @@ storybook-static # E2E test reports tests/e2e/results/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index a603bb50a29..00000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.5 diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/Gemfile b/Gemfile index d8b9c135680..33f0cd9333d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,9 @@ source "https://rubygems.org" -gem "cocoapods", "~> 1.11.3" +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby ">= 2.6.10" + +gem "cocoapods", "~> 1.12" gem "fastlane", "~> 2" gem "xcpretty", "~> 0" diff --git a/android/app/build.gradle b/android/app/build.gradle index 315a85ed7c9..d1bb2577c57 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -3,8 +3,6 @@ apply plugin: "com.facebook.react" apply plugin: "com.google.firebase.firebase-perf" apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" -import com.android.build.OutputFile - /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. @@ -15,8 +13,8 @@ react { // root = file("../") // The folder where the react-native NPM package is. Default is ../node_modules/react-native // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen - // codegenDir = file("../node_modules/react-native-codegen") + // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen + // codegenDir = file("../node_modules/@react-native/codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js // cliFile = file("../node_modules/react-native/cli.js") @@ -59,14 +57,6 @@ project.ext.envConfigFiles = [ release: ".env.production", ] -/** - * Set this to true to create four separate APKs instead of one, - * one for each native architecture. This is useful if you don't - * use App Bundles (https://developer.android.com/guide/app-bundle/) - * and want to have separate APKs to upload to the Play Store. - */ -def enableSeparateBuildPerCPUArchitecture = false - /** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ @@ -85,16 +75,6 @@ def enableProguardInReleaseBuilds = false */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Private function to get the list of Native Architectures you want to build. - * This reads the value from reactNativeArchitectures in your gradle.properties - * file and works together with the --active-arch-only flag of react-native run-android. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} - android { ndkVersion rootProject.ext.ndkVersion @@ -110,14 +90,6 @@ android { versionName "1.3.9-19" } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } - } signingConfigs { release { if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) { @@ -155,21 +127,6 @@ android { signingConfig signingConfigs.debug } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode - } - - } - } } dependencies { diff --git a/android/app/src/main/java/com/expensify/chat/MainActivity.java b/android/app/src/main/java/com/expensify/chat/MainActivity.java index b4eb483f8de..14830b5934b 100644 --- a/android/app/src/main/java/com/expensify/chat/MainActivity.java +++ b/android/app/src/main/java/com/expensify/chat/MainActivity.java @@ -32,10 +32,7 @@ protected ReactActivityDelegate createReactActivityDelegate() { this, getMainComponentName(), // If you opted-in for the New Architecture, we enable the Fabric Renderer. - DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled - // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). - DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled - ); + DefaultNewArchitectureEntryPoint.getFabricEnabled()); } @Override diff --git a/android/app/src/main/res/drawable/rn_edit_text_material.xml b/android/app/src/main/res/drawable/rn_edit_text_material.xml index f35d9962026..73b37e4d996 100644 --- a/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -20,7 +20,7 @@ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> -