[go: nahoru, domu]

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

Update add to app code to run on modern versions of agp and gradle. #2330

Merged
merged 8 commits into from
Jun 28, 2024

Conversation

reidbaker
Copy link
Contributor
@reidbaker reidbaker commented Jun 13, 2024

Pre-launch Checklist

  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I read the Contributors Guide.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

@reidbaker reidbaker marked this pull request as draft June 13, 2024 19:41
@ericwindmill ericwindmill self-requested a review June 25, 2024 13:26
@reidbaker reidbaker marked this pull request as ready for review June 27, 2024 19:18
@reidbaker
Copy link
Contributor Author

I think the windows test has to be unrelated to this change. Opened #2335 to see if the android test is also unrelated.

@reidbaker
Copy link
Contributor Author

Android build failure will need to be fixed in another pr
samples/add_to_app/prebuilt_module/android_using_prebuilt_module is the one that is failing.

@reidbaker
Copy link
Contributor Author

How to update a sample project and its dependencies?

Pick a sample project
If it is “add to app” then
Open the top level build.gradle file in android studio
Open “Upgrade Assistant” and click upgrade
If after upgrading it fails to build try upading to a slightly less new version
If you get an unknown class version exception 61, 66, etc try setting the version of java used by modifying JAVA_HOME
If it still fails to build try checking if the flutter code referenced in the build is up to date aka no discontinued plugins
Common cases include “namespace”,
The project structure -> modules view can be helpful in understanding the dependency tree.
Once the app builds with the latest gradle/agp update any deprecated usages in app/build.gradle
compileSdkVersion -> sdkVersion
Update the target sdk version and read through each target sdk update
Export broadcast receivers
Update the way flutter is imported to use flutter gradle plugin
https://flutter.dev/go/flutter-gradle-plugin-apply

@reidbaker reidbaker merged commit 233c661 into main Jun 28, 2024
12 of 14 checks passed
@reidbaker reidbaker deleted the i150218-sensitive-content-evaluation branch June 28, 2024 15:47
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.

None yet

2 participants