Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 3526d48

Browse files
authored
Bump RN to 69 (software-mansion#3339)
## Description Bump version of react-native to 69.
1 parent 3f31281 commit 3526d48

9 files changed

Lines changed: 807 additions & 795 deletions

File tree

android/CMakeLists.txt

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,23 @@ find_library(
119119
PATHS ${LIBRN_DIR}
120120
NO_CMAKE_FIND_ROOT_PATH
121121
)
122-
find_library(
123-
FOLLY_JSON_LIB
124-
folly_json
125-
PATHS ${LIBRN_DIR}
126-
NO_CMAKE_FIND_ROOT_PATH
127-
)
122+
123+
if(${REACT_NATIVE_TARGET_VERSION} LESS 69)
124+
find_library(
125+
FOLLY_LIB
126+
folly_json
127+
PATHS ${LIBRN_DIR}
128+
NO_CMAKE_FIND_ROOT_PATH
129+
)
130+
else()
131+
find_library(
132+
FOLLY_LIB
133+
folly_runtime
134+
PATHS ${LIBRN_DIR}
135+
NO_CMAKE_FIND_ROOT_PATH
136+
)
137+
endif()
138+
128139
find_library(
129140
REACT_NATIVE_JNI_LIB
130141
reactnativejni
@@ -169,7 +180,7 @@ if(${FOR_HERMES})
169180
${HERMES_LIB}
170181
${GLOG_LIB}
171182
${FBJNI_LIB}
172-
${FOLLY_JSON_LIB}
183+
${FOLLY_LIB}
173184
${REACT_NATIVE_JNI_LIB}
174185
android
175186
)
@@ -181,7 +192,7 @@ else()
181192
${JSEXECUTOR_LIB}
182193
${GLOG_LIB}
183194
${FBJNI_LIB}
184-
${FOLLY_JSON_LIB}
195+
${FOLLY_LIB}
185196
${REACT_NATIVE_JNI_LIB}
186197
android
187198
)

android/build.gradle

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ buildscript {
351351
}
352352
}
353353
dependencies {
354-
classpath "com.android.tools.build:gradle:4.2.2"
355-
classpath "de.undercouch:gradle-download-task:4.1.2"
354+
classpath "com.android.tools.build:gradle:7.1.1"
355+
classpath "de.undercouch:gradle-download-task:5.0.1"
356356
classpath "com.diffplug.spotless:spotless-plugin-gradle:5.15.0"
357357
}
358358
}
@@ -381,8 +381,7 @@ android {
381381
"-DBOOST_VERSION=${BOOST_VERSION}",
382382
"-DBUILD_DIR=${buildDir}",
383383
"-DFOR_HERMES=${FOR_HERMES}",
384-
"-DCLIENT_SIDE_BUILD=${CLIENT_SIDE_BUILD}",
385-
"--clean-first"
384+
"-DCLIENT_SIDE_BUILD=${CLIENT_SIDE_BUILD}"
386385
abiFilters (*reactNativeArchitectures())
387386
_stackProtectorFlag ? (cppFlags("-fstack-protector-all")) : null
388387
}
@@ -459,7 +458,12 @@ task createNativeDepsDirectories(dependsOn: applyJavaPatches) {
459458
}
460459

461460
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
462-
src("https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz")
461+
def transformedVersion = BOOST_VERSION.replace("_", ".")
462+
def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
463+
if (rnMinorVersion < 69) {
464+
srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
465+
}
466+
src(srcUrl)
463467
onlyIfNewer(true)
464468
overwrite(false)
465469
dest(new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz"))
@@ -672,7 +676,17 @@ dependencies {
672676
extractHeaders("com.facebook.fbjni:fbjni:" + FBJNI_VERSION + ":headers")
673677
extractSO("com.facebook.fbjni:fbjni:" + FBJNI_VERSION)
674678

675-
def rnAAR = fileTree("$reactNative/android").matching({ it.include "**/**/*.aar" }).singleFile
679+
def buildType = "debug"
680+
tasks.all({ task ->
681+
if (task.name == "buildCMakeRelease") {
682+
buildType = "release"
683+
}
684+
})
685+
def rnAarMatcher = "**/react-native/**/*${buildType}.aar"
686+
if (rnMinorVersion < 69) {
687+
rnAarMatcher = "**/**/*.aar"
688+
}
689+
def rnAAR = fileTree("$reactNative/android").matching({ it.include rnAarMatcher }).singleFile
676690
def jscAAR = fileTree("$reactNative/../jsc-android/dist/org/webkit/android-jsc").matching({ it.include "**/**/*.aar" }).singleFile
677691
extractSO(files(rnAAR, jscAAR))
678692
}

android/rnVersionPatch/69/.gitkeep

Whitespace-only changes.

createNPMPackage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ROOT=$(pwd)
66

77
unset CI
88

9-
versions=("0.68.0" "0.67.3" "0.66.3" "0.65.1" "0.64.3")
10-
version_name=("68" "67" "66" "65" "64")
9+
versions=("0.69.1" "0.68.2" "0.67.3" "0.66.3" "0.65.1")
10+
version_name=("69" "68" "67" "66" "65")
1111

1212
for index in {0..4}
1313
do

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-reanimated",
3-
"version": "2.8.0",
3+
"version": "2.9.0",
44
"description": "More powerful alternative to Animated library for React Native.",
55
"scripts": {
66
"start": "node node_modules/react-native/local-cli/cli.js start",
@@ -84,9 +84,9 @@
8484
"string-hash-64": "^1.0.3"
8585
},
8686
"peerDependencies": {
87+
"@babel/core": "^7.0.0-0",
8788
"react": "*",
88-
"react-native": "*",
89-
"@babel/core": "^7.0.0-0"
89+
"react-native": "*"
9090
},
9191
"devDependencies": {
9292
"@babel/core": "^7.17.2",
@@ -122,11 +122,11 @@
122122
"lint-staged": "^11.2.0",
123123
"madge": "^5.0.1",
124124
"prettier": "^2.5.1",
125-
"react": "17.0.2",
126-
"react-native": "0.68.0",
125+
"react": "18.0.0",
126+
"react-native": "0.69.1",
127127
"react-native-codegen": "^0.0.7",
128128
"react-native-gesture-handler": "^1.6.1",
129-
"react-test-renderer": "17.0.2",
129+
"react-test-renderer": "18.0.0",
130130
"release-it": "^13.7.2",
131131
"typescript": "^4.1.3"
132132
},

src/Animated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export { default as View } from './reanimated2/component/View';
99
export { default as ScrollView } from './reanimated2/component/ScrollView';
1010
export { default as Image } from './reanimated2/component/Image';
1111
export { default as FlatList } from './reanimated2/component/FlatList';
12+
// @ts-ignore backward compatibility with treeshaking
1213
export * from './reanimated1';

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// tree-shaken side effects
22
import './reanimated2/js-reanimated/global';
33

4+
// @ts-ignore backward compatibility with treeshaking
45
export * from './reanimated1';
56
export * from './reanimated2';
67
export * as default from './Animated';

src/reanimated2/js-reanimated/global.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ if (shouldBeUseWeb()) {
2525
"[Reanimated] You can't use `scrollTo` with Chrome Debugger or with web version"
2626
);
2727
};
28-
global._dispatchCommand = () => {
29-
console.warn(
30-
"[Reanimated] You can't use `scrollTo` or `dispatchCommand` methods with Chrome Debugger or with web version"
31-
);
32-
};
3328
global._setGestureState = () => {
3429
console.warn(
3530
"[Reanimated] You can't use `setGestureState` with Chrome Debugger or with web version"

0 commit comments

Comments
 (0)