Skip to content

Commit

Permalink
Upgrade react-native from 0.63.3 to 0.67.5 (#15486)
Browse files Browse the repository at this point in the history
* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* make auto-complete prop for text-input compatible

* [IOS Only] react-native 0.63 to 0.67

* [Android Only] react-native 0.63 to 0.67

* bring back all the jenkinsfiles

* nix: drop unnecessary set -x from status-go build

Signed-off-by: Jakub Sokołowski <[email protected]>

* add explicity implementation line for soloader

And add deleteDebugFilesForVariant fix for libhermes.

Signed-off-by: Jakub Sokołowski <[email protected]>

* use fast-image for link previews

* fix extra line in message composer on android

This elevation prop is un-necessary and causes an extra line to appear which looks like a border but its actually a shadow.

* don't use `fast-image` for url preview favicon

* fix audio record button interfering cancel android

This fix was not needed in react-native 0.63.4 but is needed after we upgraded to 0.67.5

* get rid of unused platform import

---------
Co-authored-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
siddarthkay and jakubgs authored Apr 12, 2023
1 parent 88b9aa1 commit 3bd4038
Show file tree
Hide file tree
Showing 31 changed files with 4,234 additions and 3,263 deletions.
20 changes: 19 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ project.ext.react = [
* to guard against a hang in the UI thread after invoking status-go.
* Also a clean and rebuild is required when changing this. */
enableHermes: !disableHermes,
/* FIXME: Workaround for crash caused by missing libhermes-executor-release.so.
* https://github.com/facebook/react-native/issues/32928 */
deleteDebugFilesForVariant: { false },
enableVmCleanup: false,
/* Disable 'The first definition was here.' warnings */
hermesFlagsRelease: ["-w"],
bundleInPr: true,
Expand Down Expand Up @@ -132,6 +136,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
*/
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for in debug.
*/
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")


def getCommitHash = { ->
if (project.hasProperty("commitHash")) {
return project.commitHash
Expand Down Expand Up @@ -183,6 +193,8 @@ def getEnvOrConfig = { varName ->
}

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
Expand Down Expand Up @@ -264,6 +276,11 @@ android {
versionNameSuffix "-SNAPSHOT"
resValue "string", "build_config_package", "im.status.ethereum"
signingConfig signingConfigs.debug
if (nativeArchitectures) {
ndk {
abiFilters nativeArchitectures.split(',')
}
}
}
release {
minifyEnabled enableProguardInReleaseBuilds
Expand Down Expand Up @@ -307,6 +324,7 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.soloader:soloader:0.10.1+"
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
Expand Down Expand Up @@ -348,7 +366,7 @@ dependencies {
implementation 'com.github.status-im:function:0.0.1'
implementation 'com.facebook.fresco:fresco:2.2.0'
implementation 'com.facebook.fresco:animated-gif:2.2.0'
implementation "com.squareup.okhttp3:okhttp-tls:3.12.12"
implementation "com.squareup.okhttp3:okhttp-tls:4.9.1"
}

def getLocalNDKDir = { ->
Expand Down
6 changes: 4 additions & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>

<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
</manifest>
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" >
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.facebook.react.bridge.WritableMap;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

import com.facebook.react.ReactFragmentActivity;
import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.modules.core.PermissionListener;
import androidx.core.splashscreen.SplashScreen;
Expand Down
9 changes: 9 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ ext {
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion

if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}

}

buildscript {
Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ kotlinVersion=1.3.50
minSdkVersion=23
compileSdkVersion=31
targetSdkVersion=31
buildToolsVersion=31.0.0
buildToolsVersion=30.0.0
supportLibVersion=28.0.0
# This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix
gradlePluginVersion=3.5.4
gradlePluginVersion=4.1.0

android.useAndroidX=true
android.enableJetifier=true
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pipeline {
}

/* WARNING: Defining parameters here with the ?: trick causes them to remember last value. */
parameters {
parameters {
choice(
name: 'BUILD_TYPE',
description: 'Makefile target to build. Optional Parameter.',
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ abstract_target 'Status' do
# Pods for StatusQuo
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])
use_react_native!(:path => config[:reactNativePath],
:hermes_enabled => false)

pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
pod 'react-native-config', :path => '../node_modules/react-native-config'
Expand Down Expand Up @@ -47,4 +48,3 @@ abstract_target 'Status' do

use_native_modules!
end

Loading

0 comments on commit 3bd4038

Please sign in to comment.