mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
PR bumping the library code to compile on new arch on RN 0.73.x and restoring the proper configuration of Image component on new arch on Android. Also bumping the FabricExample to check if the code works correctly.
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
let supportsCodegenConfig = false;
|
|
try {
|
|
const rnCliAndroidVersion =
|
|
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 ? {
|
|
componentDescriptors: [
|
|
"RNSVGCircleComponentDescriptor",
|
|
"RNSVGClipPathComponentDescriptor",
|
|
"RNSVGDefsComponentDescriptor",
|
|
"RNSVGEllipseComponentDescriptor",
|
|
"RNSVGForeignObjectComponentDescriptor",
|
|
"RNSVGGroupComponentDescriptor",
|
|
"RNSVGImageComponentDescriptor",
|
|
"RNSVGLinearGradientComponentDescriptor",
|
|
"RNSVGLineComponentDescriptor",
|
|
"RNSVGMarkerComponentDescriptor",
|
|
"RNSVGMaskComponentDescriptor",
|
|
"RNSVGPathComponentDescriptor",
|
|
"RNSVGPatternComponentDescriptor",
|
|
"RNSVGRadialGradientComponentDescriptor",
|
|
"RNSVGRectComponentDescriptor",
|
|
"RNSVGSvgViewAndroidComponentDescriptor",
|
|
"RNSVGSymbolComponentDescriptor",
|
|
"RNSVGTextComponentDescriptor",
|
|
"RNSVGTextPathComponentDescriptor",
|
|
"RNSVGTSpanComponentDescriptor",
|
|
"RNSVGUseComponentDescriptor"
|
|
],
|
|
cmakeListsPath: "../android/src/main/jni/CMakeLists.txt"
|
|
} : {},
|
|
},
|
|
},
|
|
}
|