adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
96 stars 17 forks source link

Gradle 8 compatibility #85

Closed johnmartel closed 1 year ago

johnmartel commented 1 year ago

Hello Adapty team!

I was trying to upgrade one of our Flutter projects to Gradle 8 and AGP 8 and hit the namespace requirement on your library. I had to go through the same loops for our project, so thought I could contribute the fixes here in case it helps.

Please note that Gradle 8 and Android Studio Flamingo are required. AS Flamingo comes bundled with Java 17 and therefore CLI builds should use the same. The easiest way to ensure this is true is via SDKMAN and then run:

sdk run

given you have an sdkmanrc file at your project root containing:

java=17.0.6-zulu

Fixes #84

vladd-g commented 1 year ago

Hello John!

Thank you for the contribution, we appreciate it! But we already had a commit on it, could you please check this one if it would solve the problem in your case? It doesn't require increasing Gradle and Android Studio right away

johnmartel commented 1 year ago

Hello John!

Thank you for the contribution, we appreciate it! But we already had a commit on it, could you please check this one if it would solve the problem in your case? It doesn't require increasing Gradle and Android Studio right away

@vladd-g Oh I didn't notice your dev branch. Will take a look and try rebuilding your example app with this simple commit. I agree that if you don't have to upgrade to Gradle 8 while letting consumers do it at their will, it is a better solution. Let me try that over the weekend and I'll let you know.

vladd-g commented 1 year ago

@johnmartel Thank you! From my side, everything was ok with the example (but I haven't included the same to the example module's build.gradle in the commit since it's not a part of the sdk, but it may be needed to build the example itself)

johnmartel commented 1 year ago

@vladd-g I confirm that 7a79823 allows me to build my project with AGP 8 and Gradle 8 👍 Looking forward to integrate this update.

I think we can safely close this PR now.