Skip to content

Commit

Permalink
Merge pull request #45289 from software-mansion-labs/@wolewicki/rn-07…
Browse files Browse the repository at this point in the history
…5-upgrade

RN 0.75 upgrade
  • Loading branch information
roryabraham authored Aug 26, 2024
2 parents 1862abc + 205299a commit added91
Show file tree
Hide file tree
Showing 132 changed files with 23,447 additions and 20,714 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14543,6 +14543,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down Expand Up @@ -15369,9 +15370,9 @@ module.exports = require("zlib");
/***/ 3286:
/***/ ((module) => {

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
function _interopRequireDefault(e) {
return e && e.__esModule ? e : {
"default": e
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11881,6 +11881,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2959,6 +2959,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core';
import type {CompareResult, PerformanceEntry} from '@callstack/reassure-compare/src/types';
import type {CompareResult, MeasureEntry} from '@callstack/reassure-compare';
import fs from 'fs';

const run = (): boolean => {
Expand All @@ -16,8 +16,8 @@ const run = (): boolean => {

for (let i = 0; i < regressionOutput.countChanged.length; i++) {
const measurement = regressionOutput.countChanged[i];
const baseline: PerformanceEntry = measurement.baseline;
const current: PerformanceEntry = measurement.current;
const baseline: MeasureEntry = measurement.baseline;
const current: MeasureEntry = measurement.current;

console.log(`Processing measurement ${i + 1}: ${measurement.name}`);

Expand Down
1 change: 1 addition & 0 deletions .github/libs/GitUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function getCommitHistoryAsJSON(fromTag: string, toTag: string): Promise<CommitT
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}

Expand Down
15 changes: 15 additions & 0 deletions .github/scripts/removeInvalidJson.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require 'json'

# List of JSON strings
json_strings = ARGV

# Parse each JSON string and remove any that couldn't be parsed
valid_jsons = json_strings.select do |json_string|
begin
JSON.parse(json_string)
true
rescue JSON::ParserError
false
end
end
4 changes: 3 additions & 1 deletion .github/scripts/verifyPodfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ if ! read_lines_into_array PODSPEC_PATHS < <(npx react-native config | jq --raw-
cleanupAndExit 1
fi

PODSPECS=$(./.github/scripts/printPodspec.rb "${PODSPEC_PATHS[@]}")

# Format a list of Pods based on the output of the config command
if ! FORMATTED_PODS=$( \
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$(./.github/scripts/printPodspec.rb "${PODSPEC_PATHS[@]}")" \
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$(./.github/scripts/removeInvalidJson.rb "${PODSPECS}")" \
); then
error "Error: could not parse podspecs at paths parsed from react-native config"
cleanupAndExit 1
Expand Down
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DerivedData
*.p12
*.mobileprovision
ios-fastlane-json-key.json
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -78,7 +78,7 @@ android/app/android-fastlane-json-key.json
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

# Local DEV config
Expand Down Expand Up @@ -127,6 +127,14 @@ config/webpack/*.pem
dist/
web-build/

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Storage location for downloaded app source maps (see scripts/symbolicate-profile.ts)
.sourcemaps/

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"
ruby ">= 2.6.10"

gem "cocoapods", "= 1.15.2"
gem "activesupport", ">= 6.1.7.3", "< 7.1.0"
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem "fastlane", "~> 2", ">= 2.222.0"
gem "xcpretty", "~> 0"

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (= 1.15.2)
fastlane (~> 2, >= 2.222.0)
fastlane-plugin-aws_s3
Expand All @@ -302,4 +302,4 @@ RUBY VERSION
ruby 2.6.10p210

BUNDLED WITH
2.4.14
2.4.19
17 changes: 9 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ fullstory {
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// 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 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")
// 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 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")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down Expand Up @@ -62,6 +62,8 @@ react {
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
//
/* Autolinking */
autolinkLibrariesWithApp()
// 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())
Expand Down Expand Up @@ -246,6 +248,5 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0")
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin
apply plugin: 'com.google.firebase.crashlytics'
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
load(bridgelessEnabled = false)
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
}

// Force the app to LTR mode.
val sharedI18nUtilInstance = I18nUtil.getInstance()
val sharedI18nUtilInstance = I18nUtil.instance
sharedI18nUtilInstance.allowRTL(applicationContext, false)

// Start the "js_load" custom performance tracing metric. This timer is stopped by a native
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/res/drawable/rn_edit_text_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">

android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
ndkVersion = "26.1.10909125"

androidXCore = "1.0.2"
multiDexEnabled = true
googlePlayServicesVersion = "17.0.0"
kotlinVersion = '1.8.10'
kotlinVersion = "1.9.24"

// This property configures the type of Mapbox SDK used by the @rnmapbox/maps library.
// "mapbox" indicates the usage of the Mapbox SDK.
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
16 changes: 8 additions & 8 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

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

goto fail

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

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
8 changes: 3 additions & 5 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'NewExpensify'
include ':react-native-webview'
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
include ':react-native-webview'
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
include ':react-native-webview'
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
include ':react-native-image-size'
project(':react-native-image-size').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-size/android')
include ':react-native-config'
Expand All @@ -13,7 +12,6 @@ include ':react-native-plaid-link-sdk'
project(':react-native-plaid-link-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-plaid-link-sdk/android')
include ':react-native-dev-menu'
project(':react-native-dev-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dev-menu/android')
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')
includeBuild('../node_modules/react-native') {
Expand Down
Loading

0 comments on commit added91

Please sign in to comment.