File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed
Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 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+
112module . exports = {
213 dependency : {
314 platforms : {
4- android : {
5- libraryName : 'safeareacontext' ,
6- componentDescriptors : [
7- 'RNCSafeAreaProviderComponentDescriptor' ,
8- 'RNCSafeAreaViewComponentDescriptor' ,
9- ] ,
10- cmakeListsPath : 'src/main/jni/CMakeLists.txt' ,
11- } ,
15+ android : supportsCodegenConfig
16+ ? {
17+ libraryName : 'safeareacontext' ,
18+ componentDescriptors : [
19+ 'RNCSafeAreaProviderComponentDescriptor' ,
20+ 'RNCSafeAreaViewComponentDescriptor' ,
21+ ] ,
22+ cmakeListsPath : 'src/main/jni/CMakeLists.txt' ,
23+ }
24+ : { } ,
1225 macos : null ,
1326 windows : null ,
1427 } ,
1528 } ,
16- } ;
29+ } ;
You can’t perform that action at this time.
0 commit comments