Capacitor 3 Upgrade: Updating Android packages in Project Structure Suggestions #5101
-
Hi there! 👋 I am currently upgrading our app from Capacitor 2 to Capacitor 3 and had a question about a suggestion in the upgrade guide. First of all, I want to give a BIG "THANK YOU!" to those who determined the scope of Capacitor 3 and those who worked on the upgrade guide! Upgrading from v2 to v3 has been fairly straightforward because most of the changes involved the splitting-out of plugins without lumping a lot of other changes into the mix. The smoothness of the upgrade is also notably attributed to the detailed and well-written upgrade guide. That guide has been very valuable--especially as it pertains to maintaining two native projects with many project files. Trying to diff our existing files with the files from the current Android and iOS project templates would be quite tedious. Bravo! 👏 The upgrade guide says, "You may want to evaluate suggested updates to Android packages in the Suggestions section of the Project Structure dialog." My suggested updates look like thus: My question is: How do I know which updates are safe to take? I know that depends on each project, but are there any general guidelines? What I'm afraid of messing up is some specific configuration needed for Cordova plugins in our project. I can check out the projects for all such plugins and try to make a determination but thought I'd ask here for any general recommendations. Thanks so much! 😀 Kevin |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Over time google has proven that they don't follow semver on their libraries, they have introduced breaking changes in minor or patch version bumps. (maybe they didn't do it on purpose) But I would recommend to always use latest (stable) available, and if you find any issue, downgrade to the previous one or until everything works again. In the upgrade guides we put the version that is latest at the moment of writing the guide and verify that everything works, so that's why we recommend those. I've noticed that you have two dependencies for android support libraries (v4), one on your app and another one on a cordova plugin. For the cordova-android dependency, I've tested and you can't use version 10 until we merge and release this PR, but using cordova-android 10 requires to bump your minSDK to 22 instead of 21. |
Beta Was this translation helpful? Give feedback.
Over time google has proven that they don't follow semver on their libraries, they have introduced breaking changes in minor or patch version bumps. (maybe they didn't do it on purpose)
But I would recommend to always use latest (stable) available, and if you find any issue, downgrade to the previous one or until everything works again.
In the upgrade guides we put the version that is latest at the moment of writing the guide and verify that everything works, so that's why we recommend those.
I've noticed that you have two dependencies for android support libraries (v4), one on your app and another one on a cordova plugin.
You shouldn't need the one in your app anymore since Capacitor swi…