mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 01:00:43 +00:00
fix: react-native@0.73 sourceSet to maintain support (#2543)
# Summary #2541 is not compatible with `react-native@0.73`. This PR introduces sourceSet to maintain support for that version. ## Test Plan Build app with `react-native@0.73.x` ## Compatibility | OS | Implemented | | ------- | :---------: | | Android | ✅ |
This commit is contained in:
+14
-3
@@ -118,10 +118,21 @@ android {
|
||||
"src/paper/java",
|
||||
]
|
||||
}
|
||||
if (getReactNativeMinorVersion() >= 75) {
|
||||
srcDirs += "src/borderRadiusRn75/java"
|
||||
|
||||
if (getReactNativeMinorVersion() >= 75) { // borderRadius fix https://github.com/software-mansion/react-native-svg/pull/2415
|
||||
// Use for react-native@0.75 and above
|
||||
srcDirs += "src/SvgViewManager75/java"
|
||||
} else {
|
||||
srcDirs += "src/transformRn73/java"
|
||||
// Maintain compatibility with react-native@0.73 and react-native@0.74
|
||||
srcDirs += "src/SvgViewManager73/java"
|
||||
}
|
||||
|
||||
if (getReactNativeMinorVersion() >= 74) { // new API https://github.com/software-mansion/react-native-svg/pull/2541
|
||||
// Use for react-native@0.74 and above
|
||||
srcDirs += "src/SvgPackage74/java"
|
||||
} else {
|
||||
// Maintain compatibility with react-native@0.73
|
||||
srcDirs += "src/SvgPackage73/java"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user