Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Android project to Android Gradle Plugin 8.2 #43

Merged

Conversation

techouse
Copy link
Contributor

@techouse techouse commented Feb 26, 2024

Summary

  • updated project to use Android Gradle Plugin (AGP) 8.2
  • updated Kotlin to 1.9.22
  • added android.namespace
  • removed package from AndroidManifest.xml
  • bumped compileSdkVersion to 34

Testing Plan

  • Tested locally.

Added this to pubspec.yaml

mparticle_flutter_sdk:
  git:
    url: https://github.com/techouse/mparticle-flutter-sdk.git
    ref: chore/update-android-to-agp-8.2

android/build.gradle Outdated Show resolved Hide resolved
Copy link
Member

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. some quick feedback below!

@techouse techouse requested a review from rmi22186 March 7, 2024 20:24
@techouse
Copy link
Contributor Author

techouse commented Mar 7, 2024

Thank you for the PR. some quick feedback below!

Thanks for talking the time to review it @rmi22186 😇

I've amended the code as requested.

rmi22186
rmi22186 previously approved these changes Mar 11, 2024
@techouse
Copy link
Contributor Author

techouse commented Mar 11, 2024

@rmi22186 looks like the build and test workflow is outdated; I'll try to fix it but it will probably need another approval from you to run

@rmi22186
Copy link
Member

@techouse yes i'll keep an eye on this PR!

@techouse
Copy link
Contributor Author

techouse commented Mar 11, 2024

@techouse yes i'll keep an eye on this PR!

@rmi22186 ok, I have facelifted the example and fixed the CI

  • refactored .github/workflows/pull-request.yml
    • run package Dart tests before attempting Android, iOS and Web builds
    • require test to pass before attempting builds
  • updated the Android example to run with Flutter 3.10+
  • migrated the Android example away from deprecated Gradle imperative syntax
  • updated the iOS example to run with Flutter 3.10+
  • replaced deprecated setMockMethodCallHandler in test/mparticle_flutter_sdk_test.dart

I have ALSO

  • bumped the minimum Dart SDK version to 3.0.0
  • bumped the minimum Flutter SDK version to 3.10.0

@techouse techouse requested a review from rmi22186 March 18, 2024 14:40
@techouse
Copy link
Contributor Author

@rmi22186 I fixed the Build example web CI step.

Copy link
Member

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much appreciated for your input here. Please see my fairly quick comments!

.github/workflows/pull-request.yml Show resolved Hide resolved
example/.gitignore Outdated Show resolved Hide resolved
pubspec.yaml Outdated Show resolved Hide resolved
@techouse techouse requested a review from rmi22186 March 18, 2024 22:37
@techouse
Copy link
Contributor Author

techouse commented Mar 19, 2024

@rmi22186 I first decided to simply pin to the latest working version (current 3.19.3). Then I changed my mind to make a matrix of the latest stable version and last known working version, however, I later realized that it might not compile when left unattended for a long time.

tl;dr I reverted back to a pinned version

# pinned to latest stable version
FLUTTER_SDK_VERSION: 3.19.3

Copy link
Member

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you for the contribution!

@rmi22186 rmi22186 merged commit 1094b42 into mParticle:development Mar 19, 2024
7 checks passed
@rmi22186
Copy link
Member

@techouse - This has been published to pub.dev as version 1.0.4. Thanks again!

@techouse techouse deleted the chore/update-android-to-agp-8.2 branch March 19, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants