Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] Upgrade React Native 0.71.11 - Android changes #51289

Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d108e4d
Upgrade Gradle to version 7.5.1
fluiddot Jun 5, 2023
82764a2
Upgrade Gradle plugin
fluiddot Jun 5, 2023
13291de
Remove no longer needed files in new version
fluiddot Jun 5, 2023
20f783b
Update Flipper initialization
fluiddot Jun 6, 2023
6de2bc6
Update demo project main application
fluiddot Jun 6, 2023
2b366c1
Remove gradle download task plugin
fluiddot Jun 6, 2023
ddb7145
Bump ndk version
fluiddot Jun 6, 2023
86b22be
Remove no longer need logic related to `newArchEnabled`
fluiddot Jun 6, 2023
d4159c2
Apply plugin React Native Gradle plugin
fluiddot Jun 6, 2023
b82d54f
Use React Native and Hermes modules from Maven
fluiddot Jun 6, 2023
873a345
Remove exclude group from Flipper
fluiddot Jun 6, 2023
1bd3d3e
Update comments in `build.gradle` to align with new RN version
fluiddot Jun 6, 2023
72ac853
Remove deprecated Gradle property
fluiddot Jun 6, 2023
a9f99ea
Add `mavenLocal` repository to allow testing local binaries
fluiddot Jun 6, 2023
05b94d1
Bump Reanimated and Gesture handler libraries
fluiddot Jun 6, 2023
e2f6647
Merge branch 'rnmobile/upgrade/react-native-0.71.8' into rnmobile/upg…
fluiddot Jun 16, 2023
4d49c31
Revert "Upgrade Gradle plugin"
dcalhoun Jun 20, 2023
437450e
build: Resolve react-native-gradle-plugin incompatability
dcalhoun Jun 20, 2023
7211636
Merge branch 'rnmobile/upgrade/react-native-0.71.8' of github.com:Wor…
dcalhoun Jun 26, 2023
587d7d2
Reduce priority of `mavenLocal` repository in Android build configura…
fluiddot Jun 27, 2023
5ac80c2
Merge branch 'rnmobile/upgrade/react-native-0.71.8' into rnmobile/upg…
fluiddot Jun 27, 2023
2aa0be3
Disable `react-native-screens` in navigators
fluiddot Jun 27, 2023
e3816ea
Fix render order of animated view to highlight selected segment
fluiddot Jun 27, 2023
79bc24f
Merge branch 'rnmobile/upgrade/react-native-0.71.8' into rnmobile/upg…
fluiddot Jun 28, 2023
87d3d55
Bump Linear gradient Android library
fluiddot Jun 28, 2023
97e686d
Merge branch 'rnmobile/upgrade/react-native-0.71.8' into rnmobile/upg…
fluiddot Jun 28, 2023
f2bcf07
Merge branch 'rnmobile/upgrade/react-native-0.71.8' into rnmobile/upg…
fluiddot Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions packages/react-native-aztec/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ repositories {
}
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
mavenCentral()
}

dependencies {
Expand All @@ -100,7 +94,7 @@ dependencies {

def rnVersion = readReactNativeVersion('../../../package.json', 'devDependencies')
println "react-native version for react-native-aztec: $rnVersion"
implementation "com.facebook.react:react-native:$rnVersion"
implementation "com.facebook.react:react-android:$rnVersion"
}

project.afterEvaluate {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions packages/react-native-aztec/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions packages/react-native-aztec/android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-aztec/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pluginManagement {
gradle.ext.kotlinVersion = '1.6.10'

plugins {
id "com.android.library" version "7.2.1"
id "com.android.library" version "7.3.1"
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
id "com.automattic.android.publish-to-s3" version "0.7.0"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native-bridge/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ plugins {

allprojects {
repositories {
mavenCentral()
mavenLocal()
// Starting from React Native 0.70, we no longer need to publish React Native binaries
// because they are already published to Maven (reference: https://t.ly/Biea).
// However, the third-party dependencies from forked repositories still point to older
// versions of React Native, hence we need to keep this Maven repository.
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions packages/react-native-bridge/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions packages/react-native-bridge/android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ repositories {
maven { url "https://a8c-libs.s3.amazonaws.com/android" }
maven { url "https://jitpack.io" }
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
mavenCentral()
}

dependencies {
Expand All @@ -68,21 +62,15 @@ dependencies {
println "react-native version for react-native-bridge: $rnVersion"
def packageJson = '../../../react-native-editor/package.json'

implementation "com.facebook.react:react-native:$rnVersion"
implementation "com.facebook.react:react-android:$rnVersion"
implementation "com.github.wordpress-mobile:react-native-video:${extractPackageVersion(packageJson, 'react-native-video', 'dependencies')}"
implementation "com.github.wordpress-mobile:react-native-linear-gradient:${extractPackageVersion(packageJson, 'react-native-linear-gradient', 'dependencies')}"
implementation "com.github.wordpress-mobile:react-native-slider:${extractPackageVersion(packageJson, '@react-native-community/slider', 'dependencies')}"
implementation "com.github.wordpress-mobile:react-native-reanimated:${extractPackageVersion(packageJson, 'react-native-reanimated', 'dependencies')}"
implementation "com.github.wordpress-mobile:react-native-prompt-android:${extractPackageVersion(packageJson, 'react-native-prompt-android', 'dependencies')}"

implementation("com.github.wordpress-mobile:react-native-gesture-handler:${extractPackageVersion(packageJson, 'react-native-gesture-handler', 'dependencies')}", {
// Remove Reanimated transitive dependency as it's already defined here
exclude group: 'com.github.wordpress-mobile', module: 'react-native-reanimated'
})

// Published by `wordpress-mobile/react-native-libraries-publisher`
// See the documentation for this value in `build.gradle.kts` of `wordpress-mobile/react-native-libraries-publisher`
def reactNativeLibrariesPublisherVersion = "v2"
def reactNativeLibrariesPublisherVersion = "v3"
def reactNativeLibrariesGroupId = "org.wordpress-mobile.react-native-libraries.$reactNativeLibrariesPublisherVersion"
implementation "$reactNativeLibrariesGroupId:react-native-get-random-values:${extractPackageVersion(packageJson, 'react-native-get-random-values', 'dependencies')}"
implementation "$reactNativeLibrariesGroupId:react-native-safe-area-context:${extractPackageVersion(packageJson, 'react-native-safe-area-context', 'dependencies')}"
Expand All @@ -92,10 +80,10 @@ dependencies {
implementation "$reactNativeLibrariesGroupId:react-native-masked-view:${extractPackageVersion(packageJson, '@react-native-masked-view/masked-view', 'dependencies')}"
implementation "$reactNativeLibrariesGroupId:react-native-clipboard:${extractPackageVersion(packageJson, '@react-native-clipboard/clipboard', 'dependencies')}"
implementation "$reactNativeLibrariesGroupId:react-native-fast-image:${extractPackageVersion(packageJson, 'react-native-fast-image', 'dependencies')}"
implementation "$reactNativeLibrariesGroupId:react-native-reanimated:${extractPackageVersion(packageJson, 'react-native-reanimated', 'dependencies')}"
implementation "$reactNativeLibrariesGroupId:react-native-gesture-handler:${extractPackageVersion(packageJson, 'react-native-gesture-handler', 'dependencies')}"

runtimeOnly("com.facebook.react:hermes-engine:$rnVersion", {
exclude group:'com.facebook.fbjni'
})
runtimeOnly "com.facebook.react:hermes-android:$rnVersion"

if (willPublishReactNativeBridgeBinary) {
implementation "org.wordpress-mobile.gutenberg-mobile:react-native-aztec:$reactNativeAztecVersion"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-bridge/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pluginManagement {
gradle.ext.kotlinVersion = '1.6.10'

plugins {
id "com.android.library" version "7.2.1"
id "com.android.library" version "7.3.1"
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
id "com.automattic.android.publish-to-s3" version "0.7.0"
}
Expand Down
55 changes: 0 additions & 55 deletions packages/react-native-editor/android/app/BUCK

This file was deleted.

Loading