From 03a2872fb0b1c71529e6243b0e3a3b336294c4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Kosmaty?= Date: Thu, 31 Oct 2024 21:32:29 +0100 Subject: [PATCH] chore: Remove legacy version check in `react-native.config.js` (#540) --- react-native.config.js | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/react-native.config.js b/react-native.config.js index 160896e0..2b1309f7 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -1,27 +1,14 @@ -let supportsCodegenConfig = true; -try { - const rnCliAndroidVersion = require.main.require( - '@react-native-community/cli-platform-android/package.json', - ).version; - const [major] = rnCliAndroidVersion.split('.'); - supportsCodegenConfig = major >= 9; -} catch (e) { - // ignore -} - module.exports = { dependency: { platforms: { - android: supportsCodegenConfig - ? { - libraryName: 'safeareacontext', - componentDescriptors: [ - 'RNCSafeAreaProviderComponentDescriptor', - 'RNCSafeAreaViewComponentDescriptor', - ], - cmakeListsPath: 'src/main/jni/CMakeLists.txt', - } - : {}, + android: { + libraryName: 'safeareacontext', + componentDescriptors: [ + 'RNCSafeAreaProviderComponentDescriptor', + 'RNCSafeAreaViewComponentDescriptor', + ], + cmakeListsPath: 'src/main/jni/CMakeLists.txt', + }, macos: null, windows: null, },