Commit 0d4b34f
authored
Remove
## Description
This PR removes the `REACT_NATIVE_MINOR_VERSION` build flag and fixes
the `target_compile_reactnative_options` call in the Android
`CMakeLists`.
The only consumer of `REACT_NATIVE_MINOR_VERSION` was a >= 81 check in
`RNGHRuntimeDecorator.cpp`, which is always true on supported
react-native versions. If a version check becomes necessary in the
future, react-native ships `<cxxreact/ReactNativeVersion.h>` with the
`REACT_NATIVE_VERSION_MINOR` macro, available on all platforms and build
systems.
The `target_compile_reactnative_options` block added in #3688 never
executed: it ran before `find_package(ReactAndroid)` defines
`ReactAndroid_VERSION_MINOR`, referenced an undefined `LIB_TARGET_NAME`,
and was missing the include of `react-native-flags.cmake` that defines
the function. This PR fixes it to match how reanimated and worklets use
it. Note that this applies RN_SERIALIZABLE_STATE and HERMES_V1_ENABLED=1
to our JNI target for the first time, matching how ReactAndroid itself
is built.
## Test plan
- basic-example builds and launches on iOS (pod install + yarn ios)
- basic-example builds on Android (assembleDebug, -Wall -Werror, no new
warnings)
- compile_commands.json confirms RN_SERIALIZABLE_STATE and
HERMES_V1_ENABLED=1 are applied to all translation units
- basic-example builds under the experimental SwiftPM setup from
react-native 0.87
- pod ipc spec evaluates the modified podspec cleanlyREACT_NATIVE_MINOR_VERSION build flag (#4422)1 parent 3e4497e commit 0d4b34f
5 files changed
Lines changed: 6 additions & 56 deletions
File tree
- packages/react-native-gesture-handler
- android
- src/main/jni
- scripts
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
| |||
177 | 171 | | |
178 | 172 | | |
179 | 173 | | |
180 | | - | |
181 | 174 | | |
182 | 175 | | |
183 | 176 | | |
184 | 177 | | |
185 | 178 | | |
186 | | - | |
187 | 179 | | |
188 | 180 | | |
189 | 181 | | |
| |||
Lines changed: 5 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 4 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 5 | + | |
15 | 6 | | |
16 | 7 | | |
17 | 8 | | |
| |||
23 | 14 | | |
24 | 15 | | |
25 | 16 | | |
| 17 | + | |
| 18 | + | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
| |||
38 | 31 | | |
39 | 32 | | |
40 | 33 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 34 | | |
46 | 35 | | |
47 | 36 | | |
| 37 | + | |
| 38 | + | |
48 | 39 | | |
49 | 40 | | |
50 | 41 | | |
| |||
Lines changed: 0 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 8 | | |
37 | 9 | | |
38 | 10 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
0 commit comments