Skip to content

Commit cc74891

Browse files
committed
react-native: upgrade to 0.75.3
This commit upgrades `react-native` to `v0.75.3` Following changes were also made : - `NDK` upgraded to `26.1.10909125` - `@react-native/gradle-plugin` is set up using `includeBuild` gradle mechanism which is a better way. - `reactjs` is upgraded to `18.3.1` - `react-native-config` is upgraded to `1.5.3` - `react-native-navigation` is upgraded to `7.40.1` - `react-native-reanimated` is upgraded to `3.16.6` - `react-native-gesture-handler` is upgraded to `2.22.0` - `react-native-keychain` is upgraded to `9.2.2` - patches for react-native-navigation are updated. PR in RNN repo -> wix/react-native-navigation#7913 - patched autolinking behaviour in `react-native` to prevent generating `autolinking.json` in a gradle step. We run gradle in a sandbox with `--offline` so this is not feasible for us. We do the same thing via a nix phase called `autolinkPhase`. - `AGP` is bumped to `8.5.0` and `aapt2` is bumped to `8.5.0-11315950` - we no longer need to patch out `-X` from `script_phases-patched.sh` - `gradle` deps were updated. - `pods` were updated. - `gems` were updated.
1 parent 2e88ba9 commit cc74891

File tree

51 files changed

+7362
-4359
lines changed

Some content is hidden

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

51 files changed

+7362
-4359
lines changed

android/app/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ react {
5454
//
5555
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5656
// hermesFlags = ["-O", "-output-source-map"]
57+
58+
/* Autolinking */
59+
autolinkLibrariesWithApp()
5760
}
5861

5962
/**
@@ -301,7 +304,7 @@ dependencies {
301304
implementation("com.facebook.fresco:fresco:2.5.0")
302305
implementation("com.facebook.fresco:animated-gif:2.5.0")
303306
implementation("com.squareup.okhttp3:okhttp-tls:4.11.0")
304-
implementation("com.google.prefab:cli:2.0.0")
307+
implementation("com.google.prefab:cli:2.1.0")
305308
implementation("com.android.tools.build:aapt2:8.1.1-10154469")
306309
}
307310

@@ -338,8 +341,6 @@ task hemroidBuild(type: Exec) {
338341

339342
preBuild.dependsOn hemroidBuild
340343

341-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
342-
343344
def googleServicesConfigFile = "./googleServices.gradle";
344345
if (project.file(googleServicesConfigFile).exists()) {
345346
apply from: file(googleServicesConfigFile)

android/app/jni/Android.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ LOCAL_MODULE := status-logs
66
LOCAL_SRC_FILES := Log.c
77

88
LOCAL_CPPFLAGS := -std=c++11 -fexceptions -I$(LOCAL_PATH)/include
9+
# Fix for : ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
10+
LOCAL_CFLAGS := '-Wno-error=implicit-function-declaration'
911
LOCAL_LDFLAGS := -llog
1012

1113
include $(BUILD_SHARED_LIBRARY)

android/app/src/debug/AndroidManifest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@
77
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
88
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
99

10-
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
10+
<application
11+
tools:targetApi="28"
12+
tools:ignore="GoogleAppIndexingWarning"
13+
android:usesCleartextTraffic="true"
14+
tools:replace="android:appComponentFactory"
15+
android:appComponentFactory="androidx.core.app.CoreComponentFactory" />
1116
</manifest>

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
android:largeHeap="true"
4343
android:usesCleartextTraffic="true"
4444
android:extractNativeLibs="true"
45-
android:requestLegacyExternalStorage="true">
45+
android:requestLegacyExternalStorage="true"
46+
android:supportsRtl="true">
4647
<!-- After upgrading Android Gradle Plugin to 4.2.0 and above we must get rid of `extractNativeLibs="true"`
4748
and use`useLegacyPackaging` flag in our app's `build.gradle`-->
4849
<meta-data android:name="commitHash" android:value="${commitHash}"/>

android/app/src/main/java/im/status/ethereum/MainApplication.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.facebook.react.PackageList
66
import com.facebook.react.ReactApplication
77
import com.facebook.react.ReactNativeHost
88
import com.facebook.react.ReactPackage
9-
import com.facebook.react.bridge.JSIModulePackage
109
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
1110
import com.facebook.react.modules.network.OkHttpClientProvider
1211
import com.reactnativenavigation.NavigationApplication

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ext {
1717
kotlinVersion = project.kotlinPluginVersion
1818
kotlinPluginVersion = project.kotlinPluginVersion
1919
kotlinToolsVersion = project.kotlinPluginVersion
20-
ndkVersion = "25.2.9519653"
20+
// This version must match ndkVersion version inside nix/pkgs/android-sdk/compose.nix
21+
ndkVersion = "26.1.10909125"
2122
}
2223

2324
buildscript {

android/gradle.properties

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ targetSdkVersion=34
2727
buildToolsVersion=34.0.0
2828
supportLibVersion=28.0.0
2929
# This should match version from nix/pkgs/aapt2/default.nix
30-
gradlePluginVersion=7.4.2
31-
kotlinPluginVersion=1.9.0
30+
gradlePluginVersion=8.5.0
31+
kotlinPluginVersion=1.9.24
3232

3333
android.useAndroidX=true
3434
android.enableJetifier=true
@@ -54,7 +54,6 @@ commitHash=unknown
5454
# to write custom TurboModules/Fabric components OR use libraries that
5555
# are providing them.
5656
newArchEnabled=false
57-
5857
# Use this property to enable or disable the Hermes JS engine.
5958
# If set to false, you will be using JSC instead.
6059
# Disabled for debug builds to avoid 'maximum call stack exceeded' errors.

android/settings.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ includeBuild('../node_modules/@react-native/gradle-plugin')
55
gradlePluginPortal()
66
}
77
}
8+
plugins { id("com.facebook.react.settings") }
9+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
810
include ':react-native-share'
911
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
1012
rootProject.name = 'StatusIm'
11-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
1213
include ':react-native-nfc-manager'
1314
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
1415
include ':app'

fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ def build_ios_adhoc(readonly: false, pr_build: false)
116116
keychain_password: kc.pass
117117
)
118118

119+
# clean pods and print verbose for debugging
120+
cocoapods(
121+
clean: true,
122+
repo_update: true,
123+
verbose: true,
124+
podfile: "ios/Podfile"
125+
)
126+
119127
build_ios_app(
120128
scheme: scheme,
121129
workspace: 'ios/StatusIm.xcworkspace',

fastlane/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
22

33
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
44
gem 'fastlane', '>= 2.131.0'
5+
gem 'cocoapods', '~> 1.16.2'

0 commit comments

Comments
 (0)