wuxudong / react-native-charts-wrapper

a react native charts wrapper (support android & iOS)
2.43k stars 657 forks source link

@types/react-native-charts-wrapper - update from `0.5.10` to `0.5.11` breaks react-native Android build #981

Closed cervebar closed 5 months ago

cervebar commented 6 months ago

We updated patch version of @types/react-native-charts-wrapper from 0.5.10 to 0.5.11 and it broke Android build as it now wants Java 17 instead of Java 11. When running yarn there is 53 changes in dependencies as consequence of this one dependency upgrade. This doesn't seem right for only patch update. 😢

Update: the cause is because of update to react-native@0.73, which breaks build compatibility.

$ yarn
➤ YN0000: · Yarn 4.0.2
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @types/react-native-charts-wrapper@npm:0.5.11, @isaacs/ttlcache@npm:1.4.1, and 53 more.
➤ YN0085: │ - @types/react-native-charts-wrapper@npm:0.5.10
FAILURE: Build failed with an exception.

* Where:
Build file '/my/path/android/app/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 17 to run. You are currently using Java 11.

Expected Behavior

Do not break Android build, be compatible with Java 11.

Actual Behavior

Couldn't build project.

Screenshots

Data and config

Steps to Reproduce the Problem

Specifications

Hope I didn't miss anything in our project setup, but I tried repeatedly change versions back and forth and it is really this what breaks my builds. Thanks in advance and well... Happy New Year 😁

cervebar commented 6 months ago

We found the cause, it's because the new patch build was made with dependency "react-native": "*", that's why react-native 0.73 is suddenly there and causing all that compatibility build problems. 😢

So for those who couldn't update to newest react-native so quickly there is workaround - to set resolutions for this package to different react-native version.