Skip to content

Ensure Example Packages Work on Android API 36 #9241

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jesswrd
Copy link
Contributor

@jesswrd jesswrd commented May 12, 2025

Ensured the example plugin apps on Android work on Android API 36 by updating configurations and sucessfully running flutter build apk (means the app can successfully build + all dependencies are resolvable). For compatibility with Android API 36, the example plugin apps on Android should have the following configurations:

targetSdk: 36
compileSdk: 36
AGP version: 8.9.1
Gradle version: 8.11.1

Most packages no longer require a manual bump of targetSdk and compileSdk due to usage of values from Flutter Gradle Plugin. Below is a list of example plugin apps on Android:

  • third_party/flutter_svg/example/android
  • flutter_plugin_android_lifecycle/example/android
  • path_provider/path_provider/example/android
  • path_provider/path_provider_android/example/android
  • two_dimensional_scrollables/example/android
  • webview_flutter/webview_flutter/example/android
  • webview_flutter/webview_flutter_android/example/android
  • file_selector/file_selector/example/android
  • file_selector/file_selector_android/example/android
  • google_sign_in/google_sign_in/example/android
  • google_sign_in/google_sign_in_android/example/android
  • pigeon/platform_tests/test_plugin/example/android
  • pigeon/platform_tests/alternate_language_test_plugin/example/android
  • interactive_media_ads/example/android
  • camera/camera/example/android
  • camera/camera_android/example/android
  • camera/camera_android_camerax/example/android
  • local_auth/local_auth_android/example/android
  • local_auth/local_auth/example/android
  • video_player/video_player_android/example/android
  • video_player/video_player/example/android
  • url_launcher/url_launcher_android/example/android
  • url_launcher/url_launcher/example/android
  • google_maps_flutter/google_maps_flutter/example/android
  • google_maps_flutter/google_maps_flutter_android/example/android
  • in_app_purchase/in_app_purchase_android/example/android
  • in_app_purchase/in_app_purchase/example/android
  • image_picker/image_picker/example/android
  • image_picker/image_picker_android/example/android
  • go_router/example/android
  • extension_google_sign_in_as_googleapis_auth/example/android
  • quick_actions/quick_actions_android/example/android
  • quick_actions/quick_actions/example/android
  • shared_preferences/shared_preferences/example/android
  • shared_preferences/shared_preferences_android/example/android
  • animations/example/android
  • espresso/example/android

Pre-Review Checklist

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

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@jesswrd jesswrd changed the title [WIP] Ensure Packages Works on SDK 36 [WIP] Ensure Example Packages Works on SDK 36 May 12, 2025
@jesswrd jesswrd changed the title [WIP] Ensure Example Packages Works on SDK 36 [WIP] Ensure Example Packages Work on SDK 36 May 12, 2025
@jesswrd jesswrd changed the title [WIP] Ensure Example Packages Work on SDK 36 [WIP] Ensure Example Packages Work on Android API 36 May 12, 2025
@jesswrd jesswrd added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels May 15, 2025
@jesswrd jesswrd marked this pull request as ready for review May 15, 2025 11:32
@jesswrd jesswrd changed the title [WIP] Ensure Example Packages Work on Android API 36 Ensure Example Packages Work on Android API 36 May 15, 2025
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: add NL at EOF

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: add NL at EOF

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: add NL at EOF

@stuartmorgan-g
Copy link
Contributor

Looks like the new toolchain is triggering some new lints that will need to be resolved.

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

For posterity, How did you update these projects? Did you use the android studio tool for updating the project or did you do something else?

@jesswrd
Copy link
Contributor Author

jesswrd commented May 16, 2025

For posterity, How did you update these projects? Did you use the android studio tool for updating the project or did you do something else?

I updated them manually. The values were dervied from the sdk 36 minimums from android docs here. I think to use the AGP upgrade tool, you would have to open each android project separately.

@camsim99
Copy link
Contributor

camsim99 commented May 16, 2025

@jesswrd Were you unable to get dart script/tool/bin/flutter_plugin_tools.dart update-dependency --android-dependency <dependency> --version <version> to work? Asking because I was hoping it could help simplify this for you! And I definitely wanna try fixing it if it's broken.

@jesswrd
Copy link
Contributor Author

jesswrd commented May 16, 2025

@jesswrd Were you unable to get dart script/tool/bin/flutter_plugin_tools.dart update-dependency --android-dependency <dependency> --version <version> to work? Asking because I was hoping it could help simplify this for you! And I definitely wanna try fixing it if it's broken.

Before I started manually updating, I looked into the command you suggested. I concluded I didn't need to use it for my purposes because compileSdk and targetSdk in examples do not need to be updated anymore due to usage of Flutter Grade Plugin.

I actually didn't see you could use that command to update Gradle on my first pass. I just tried it and it works well. It doesn't look like the update dependency command includes updating AGP for example apps. May be worthwhile to add. jk it's already a todo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants