mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
refactor: replace deprecated processTransform (#2554)
# Summary
Replace deprecated `TransformHelper.processTransform` with a new
function that also gets `transformOrigin`.
## Test Plan
Transforms should function properly, and this error should not occur
during the build process:
```
> Task :react-native-svg:compileDebugJavaWithJavac
/react-native-svg/apps/paper-example/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:390: warning: [removal] processTransform(ReadableArray,double[]) in TransformHelper has been deprecated and marked for removal
TransformHelper.processTransform(transforms, sTransformDecompositionArray);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
```
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| Android | ✅ |
This commit is contained in:
@@ -119,16 +119,18 @@ android {
|
||||
]
|
||||
}
|
||||
|
||||
if (getReactNativeMinorVersion() >= 75) { // borderRadius fix https://github.com/software-mansion/react-native-svg/pull/2415
|
||||
// Use for react-native@0.75 and above
|
||||
if (getReactNativeMinorVersion() >= 75) { // Use for react-native@0.75 and above
|
||||
// borderRadius fix https://github.com/software-mansion/react-native-svg/pull/2415
|
||||
srcDirs += "src/SvgViewManager75/java"
|
||||
} else {
|
||||
// Maintain compatibility with react-native@0.73 and react-native@0.74
|
||||
// processTransform replacement https://github.com/software-mansion/react-native-svg/pull/2554
|
||||
srcDirs += "src/RenderableViewManager75/java"
|
||||
} else { // Maintain compatibility with react-native@0.73 and react-native@0.74
|
||||
srcDirs += "src/SvgViewManager73/java"
|
||||
srcDirs += "src/RenderableViewManager73/java"
|
||||
}
|
||||
|
||||
if (getReactNativeMinorVersion() >= 74) { // new API https://github.com/software-mansion/react-native-svg/pull/2541
|
||||
// Use for react-native@0.74 and above
|
||||
if (getReactNativeMinorVersion() >= 74) { // Use for react-native@0.74 and above
|
||||
// new API https://github.com/software-mansion/react-native-svg/pull/2541
|
||||
srcDirs += "src/SvgPackage74/java"
|
||||
} else {
|
||||
// Maintain compatibility with react-native@0.73
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user