Skip to content

Commit 03a2872

Browse files
authored
chore: Remove legacy version check in react-native.config.js (#540)
1 parent e8f873f commit 03a2872

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

react-native.config.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
1-
let supportsCodegenConfig = true;
2-
try {
3-
const rnCliAndroidVersion = require.main.require(
4-
'@react-native-community/cli-platform-android/package.json',
5-
).version;
6-
const [major] = rnCliAndroidVersion.split('.');
7-
supportsCodegenConfig = major >= 9;
8-
} catch (e) {
9-
// ignore
10-
}
11-
121
module.exports = {
132
dependency: {
143
platforms: {
15-
android: supportsCodegenConfig
16-
? {
17-
libraryName: 'safeareacontext',
18-
componentDescriptors: [
19-
'RNCSafeAreaProviderComponentDescriptor',
20-
'RNCSafeAreaViewComponentDescriptor',
21-
],
22-
cmakeListsPath: 'src/main/jni/CMakeLists.txt',
23-
}
24-
: {},
4+
android: {
5+
libraryName: 'safeareacontext',
6+
componentDescriptors: [
7+
'RNCSafeAreaProviderComponentDescriptor',
8+
'RNCSafeAreaViewComponentDescriptor',
9+
],
10+
cmakeListsPath: 'src/main/jni/CMakeLists.txt',
11+
},
2512
macos: null,
2613
windows: null,
2714
},

0 commit comments

Comments
 (0)