maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
186 stars 106 forks source link

make necessary changes to update to agp 8.2.2 #382

Closed smallTrogdor closed 1 month ago

smallTrogdor commented 4 months ago

https://github.com/maplibre/flutter-maplibre-gl/issues/310

smallTrogdor commented 4 months ago

Is there an estimate when this PR will be reviewed?

m0nac0 commented 4 months ago

Thanks for contributing! Could you expand a little on the use case for this? That is, is there a specific reason you need to upgrade the AGP? (Not saying we shouldn't do it, I'm just trying to understand the use cases).

And do you know if this is still fully downward compatible, or could this e.g. cause issues when the app runs on old Android versions?

m0nac0 commented 4 months ago

The CI is failing, because we explicitly install Java 11 so far, could you please change the version from 11 to 17 in.github/workflows/flutter_ci.yml line 54?

smallTrogdor commented 3 months ago

Dear @m0nac0 , thanks for reviewing! I will make the necessary changes today and commit the changes. As to your questions:

Thank you!

smallTrogdor commented 3 months ago

Please see EDIT on previous comment.

m0nac0 commented 3 months ago

So if I understand correctly, we only really need to add the gradle namespace property (and maybe update the group property, if we are already at it) and delete the package attribute from the AndroidManifest, right? But we do not need to update Gradle, NDK and Java target versions in this plugin, since dependent projects could still use a newer Gradle version, right?

m0nac0 commented 3 months ago

The flutter team seem to have used a conditional version of the namespace property to avoid breaking older projects: https://github.com/flutter/flutter/issues/125621#issuecomment-1525995461

smallTrogdor commented 3 months ago

Your are correct. There is two ways to deal with this: Keep backwards compatible AGP until eternity (and build the switch like the flutter team) and never use any new features of Gradle ... Start upgrading the gradle version along with your releases plus ensure forward compatibility (I prefer it this way). Imo it does not make sense to retain backwards compatibility with AGP forever. As pointed out in the Issue you refered to: (Updating AGP may require other changes in your project as well, but over time using old versions of AGP is going to increasingly cause compatibility issues in general for projects, such as not being able to use current versions of some library dependencies, and not being able to use current versions of Android Studio, so is something anyone still using AGP 4.x should be seriously investigating regardless of this specific issue.) here

So you can choose option A or B and I will implement (maybe going from Gradle 4.x.x directly to 8 is a bit much) it accordingly (or you do it 😄 )

smallTrogdor commented 3 months ago

Hi @m0nac0,

can you give me an update on my previous question please ? Would like to close this PR and not have it hanging around forever ...

Thanks!

smallTrogdor commented 2 months ago

Hello @m0nac0,

any update??

kuhnroyal commented 1 month ago

I think we merged most of the changes from another PR, can you check what you think is still missing and open a new PR if required, thanks!

smallTrogdor commented 1 month ago

Hey @kuhnroyal ! So I saw all the good news and the story in #397 and I am really happy you are taking over. I am also thankful to @m0nac0 of course for all the past work - but it seems you are already putting a lot of work into this right now 👍

I can make a subsequent PR for all the changes here (especially bump the example app) - will get to it next week!