# Summary
Fix typo in CMakeLists.txt flags and use `ReactAndroid_VERSION_MINOR`
instead of `REACT_NATIVE_MINOR_VERSION`
## Test Plan
Example apps should build without warnings/errors on 0.73+ as well as on
0.77.0-rc.6
# Summary
Fixes#2599
Starting with `v15.8.0`, we support `react-native@0.73+`, which
eliminates the need to worry about AGP versions below 7. Consequently,
the `package` attribute in `AndroidManifest.xml` can be safely removed,
along with the corresponding check in `build.gradle`.
## Test Plan
Build the app on all supported versions
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| Android | ✅ |
# Summary
With react-native@0.77 `yoga::value` is no longer available and we
should use `yoga::StyleLength`.
## Test Plan
App should build again on 0.77.rc-3
# 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 | ✅ |
# 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 | ✅ |
# Summary
Fixes#2428
To not introduce the breaking change in minor version, it restores the
old `SvgViewManager.java` on RN <= 72 using sourceSets
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| Android | ✅ |
# Summary
We had similar config in react-native-screens. It caused problem when
building Paper arch app after Fabric. Those changes help, so I'm moving
them here as well.
Since AGP8 this flag is disabled by default. Consumer projects have to enable this flag in them globally if the library doesn't do this correctly itself, but uses custom buildConfig fields.
- What issues does the pull request solve? Please tag them so that they will get automatically closed once the PR is merged
Solves Build Errors with default setup using AGP8+
- What is the feature? (if applicable)
No errors and better build performance than the workaround in consuming projects would be.
Since AGP 8.0 project namespace must be set inside build script.
It is also the recommended way in Android docs.
It is also recommended, that the package name definition is removed from Android manifest file, but I've had some problems in react-native-screens with RN CLI crashing (as it was expecting the package field to exist) & according to this conversation it'll still be legal to leave package name definition in Android manifest file as long as it exactly matches the value in build script.
This will remove the requirement for people to add the proguard configs themselves. A lot of people first release to production with proguard and then realize why the app crashes. This will solve such issues.
This uses android's consumer proguard setting to enable specific proguard config.
Changed `requireNativeComponent` to `codegenNativeComponent` so that upcoming changes (Static View Configs, Bridgeless Mode and idk what more) in `react-native` are available in the library. Also, types and native components are now taken directly from `fabric` folder to make sure the values passed to the native components are the ones defined in props. It should work on all supported versions since `codegenNativeComponent` function exists from RN v. 0.61.0. Suggested by @RSNara and @cipolleschi
Reason for [`5394bbb` (#1847)](https://github.com/software-mansion/react-native-svg/pull/1847/commits/5394bbbced6c1838e67240997cf4621d7f783197):
- on `Paper`, `Animated` uses `setNativeProps` method when we set `useNativeDriver` to `false`, and does not rerender the component. Therefore, new transform lands only in `SvgView` and is parsed in `RCTViewManager.m` .
- on `Fabric`, the same code makes the components rerender. Due to this, information about new transform is passed to the `SvgView` child: `G` , making it apply translations from the transform in its `updateProps` method.
- other than `Animated` use-case, on both archs, if we just passed `transform` prop to `Svg` component, it would end up in double transformations now as well. All of those changes are due to https://github.com/software-mansion/react-native-svg/pull/1895, which added proper parsing of RN style `transform` prop (array of transformations objects) therefore making `G` properly handle `transform` prop passed from `Svg`.
Reason for [`19bcb24` (#1847)](https://github.com/software-mansion/react-native-svg/pull/1847/commits/19bcb2464b3a40a47e4396ea66f49d6a95bfc9bc): Same as https://github.com/software-mansion/react-native-screens/pull/1624
PR bumping library to RN 0.70-rc3, which might make it not compatible with earlier versions of RN on Fabric. It should come with the same change in other libraries.
In this PR, I had to remove macos code from Example since it breaks @react-native-community/cli resolution. Hopefully we can bring it back soon.
Most of Android changes for Fabric and bump of FabricExample to RN 0.69.2. iOS and JS changes are available in #1821.
The most notable change on Android is adding methods to components that accept String values of each NumberProp instead of Dynamic. Another change is changed structure of RenderableViewManager.java since we needed to abstract methods that belong only to components inheriting from VirtualView in order to be able to properly override them in their children.
- moved safeExtGet to out of `buildscript` block, because it's no longer needed to be there (previously we needed it there for getting AGP version from root project)
- bumped AGP version to 3.5.3
- replace `${safeExtGet('reactnativeVersion', '+')}` with `+`, becase react-native version automatically resolved by npm and it does not need to handle using `safeExtGet`
Hi, as React native 0.56.0 is released with MAJOR android changes such as:
-Gradle 3.5.1
-Compile using Android SDK 26
-Google Maven repo
-etc
more about Change log, specially of Android Here, https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#android-projects-are-now-compiled-using-the-android-26-sdk
and https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#android-specific-changes
Aslo as Per Google new "Google Play's target API level requirement", mentioned here https://developer.android.com/distribute/best-practices/develop/target-sdk
"Google Play will require that new apps target at least Android 8.0 (API level 26) from August 1, 2018, and that app updates target Android 8.0 from November 1, 2018."
It's clear that Android would be moving to new Gradle and new SDK changes, Thus creating a new type of error that is:
"Configuration 'compile' is obsolete and has been replaced with 'implementation' or 'Api'"
more about the Old and new configuration please see this https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration?utm_source=android-studio#new_configurations
at the heading of "Use the new dependency configurations"
Therefore, all old "compile" should be now "implementation" or "provided" should be "compileOnly"
I have tested the with "compile" and "implementation" in my current release ready product and also by "renaming" "compile" to "implementation".
Also tested with higher andorid SDK configs such as of below:
```
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 19
compileSdkVersion = 27
targetSdkVersion = 27
supportLibVersion = "27.1.1"
}
```
so SDK 27 was also compiled successully. test on Android phone with ADK 23 all looks good. Thus, `react-native-svg` was working just fine as intended. thank you so much for this package btw. Love this package so much :)
Therefore, Please would it be possible to merge as i am sure many new projects and old one are going to update specially Gradle and SDK as of Google new requirements.
related mention of Upgrading issue mention here https://github.com/facebook/react-native/issues/20273#issuecomment-405959030
Moreover, if someone still have any issue after upgrading everything successfully, then he should use following in build.gradle under `andorid/build.gradle`
```
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
supportLibVersion = "27.1.1"
}
}
}
}
```
Remove com.android.support:appcompat-v7 dependency (less version issues)
Copy PaintCompat.hasGlyph implementation verbatim.
It is the only really needed part.
Minimize issues for beginners and make first experience maximally smooth
Typographic ligature: In writing and typography, a ligature occurs where two or more graphemes or letters are joined as a single glyph.
Optimize kerning and advance widths calculation using Paint.getTextWidths(String text, float[] widths);
Make strokeWidth numberProp instead of string.
Fix caching of AlignmentBaseline.
Rename distance to pathLength.
Upgrade gradle build tools.