You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
732 B
30 lines
732 B
let supportsCodegenConfig = false;
|
|
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',
|
|
}
|
|
: {},
|
|
macos: null,
|
|
windows: null,
|
|
},
|
|
},
|
|
};
|