Skip to content

Commit 1138d97

Browse files
authored
Merge pull request #775 from callstack/chore/upgrade-rn
chore(next): upgrade RN version in both examples
2 parents 077d026 + def62d9 commit 1138d97

Some content is hidden

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

55 files changed

+5283
-5487
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
globals: {
55
expect: true,
66
element: true,

.gitignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ npm-debug.log
4747
yarn-debug.log
4848
yarn-error.log
4949

50-
# BUCK
51-
buck-out/
52-
\.buckd/
53-
android/app/libs
54-
android/keystores/debug.keystore
55-
5650
# Expo
5751
.expo/*
5852

@@ -74,3 +68,8 @@ lefthook.yml
7468
# Temporary files created by Metro to check the health of the file watcher
7569
.metro-health-check*
7670
.cxx
71+
72+
#Testing
73+
/coverage
74+
example/coverage
75+
fabricexample/coverage

android/src/fabric/java/com/reactnativepagerview/PagerViewViewManager.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,6 @@ class PagerViewViewManager : ViewGroupManager<NestedScrollableHost>(), RNCViewPa
174174
val canScroll = childCount != null && childCount > 0 && selectedPage >= 0 && selectedPage < childCount
175175
if (canScroll) {
176176
PagerViewViewManagerImpl.setCurrentItem(view, selectedPage, scrollWithAnimation)
177-
val reactContext = view.context as ReactContext
178-
UIManagerHelper.getEventDispatcherForReactTag(reactContext, view.id)?.dispatchEvent(
179-
PageSelectedEvent(view.id, selectedPage)
180-
)
181177
}
182178
}
183179

android/src/paper/java/com/reactnativepagerview/PagerViewViewManager.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ class PagerViewViewManager : ViewGroupManager<NestedScrollableHost>() {
146146
if (canScroll) {
147147
val scrollWithAnimation = commandId == COMMAND_SET_PAGE
148148
PagerViewViewManagerImpl.setCurrentItem(view, pageIndex, scrollWithAnimation)
149-
eventDispatcher.dispatchEvent(PageSelectedEvent(root.id, pageIndex))
150149
}
151150
}
152151
COMMAND_SET_SCROLL_ENABLED -> {

example/Gemfile

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

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby '>= 2.6.10'
5-
gem 'cocoapods', '>= 1.11.3'
5+
gem 'cocoapods', '~> 1.12'

example/android/app/src/main/java/com/pagerviewexample/MainActivity.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ protected ReactActivityDelegate createReactActivityDelegate() {
3232
this,
3333
getMainComponentName(),
3434
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
35-
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
36-
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
37-
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
38-
);
35+
DefaultNewArchitectureEntryPoint.getFabricEnabled());
3936
}
4037
}

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
}
1919

2020
dependencies {
21-
classpath("com.android.tools.build:gradle:7.3.1")
21+
classpath("com.android.tools.build:gradle")
2222
classpath("com.facebook.react:react-native-gradle-plugin")
2323
}
2424
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.174.0
28+
FLIPPER_VERSION=0.182.0
2929

3030
# Use this property to specify which architecture you want to build.
3131
# You can also override it from the CLI using
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

example/android/gradlew

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -205,6 +209,12 @@ set -- \
205209
org.gradle.wrapper.GradleWrapperMain \
206210
"$@"
207211

212+
# Stop when "xargs" is not available.
213+
if ! command -v xargs >/dev/null 2>&1
214+
then
215+
die "xargs is not available"
216+
fi
217+
208218
# Use "xargs" to parse quoted args.
209219
#
210220
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

0 commit comments

Comments
 (0)