Skip to content

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Dec 24, 2024

A few dependency bumps are failing due to the all_packages test targeting a lower version of Android SDK than the example apps. Instead of hardcoding an SDK version which needs to be updated manually (https://github.com/flutter/packages/pull/7891/files#r1815169527), instead use flutter.compileSdkVersion, similar to #3847.

Unblocks attempts to increase dependencies versions that require SDK 35 or higher
#7985

Pre-launch Checklist

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

@jmagman
Copy link
Member Author

jmagman commented Dec 26, 2024

 │ [!] Using compileSdk 35 requires Android Gradle Plugin (AGP) 8.1.0 or higher.                    

@jmagman
Copy link
Member Author

jmagman commented Dec 26, 2024

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

Bump like #6742

@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Jan 14, 2025
@jmagman
Copy link
Member Author

jmagman commented Jan 15, 2025

Error now is that the legacy variant is using a lower version of AGP and needs 8.1

[!] Using compileSdk 35 requires Android Gradle Plugin (AGP) 8.1.0 or higher. │
│ Please upgrade to a newer AGP version. The version of AGP that your project uses is likely │
│ defined in: │
│ /b/s/w/ir/x/w/packages/legacy/all_packages/android/settings.gradle, │
│ in the 'plugins' closure (by the number following "com.android.application"). │
│ Alternatively, if your project was created with an older version of the templates, it is likely │
│ in the buildscript.dependencies closure of the top-level build.gradle: │
│ /b/s/w/ir/x/w/packages/legacy/all_packages/android/build.gradle, │
│ as the number following "com.android.tools.build:gradle:".

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8727714051273194977/+/u/Run_package_tests/build_all_packages_for_Android_-_legacy_version/stdout

else ...<String, List<String>>{
'compileSdkVersion': <String>['compileSdk 34'],
'compileSdkVersion': <String>['compileSdk flutter.compileSdkVersion'],
Copy link
Member

Choose a reason for hiding this comment

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

From triage: Is one of these the legacy file? If so, can we make that file use compileSdk 35 (just copying discussion from internal conversation).

else ...<String, List<String>>{
'compileSdkVersion': <String>['compileSdk 34'],
'compileSdkVersion': <String>['compileSdk flutter.compileSdkVersion'],
Copy link
Member

Choose a reason for hiding this comment

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

Also, can we eliminate this conditional logic by just using compileSdk = 35 in both cases? I think that is valid Groovy as well as Kotlin

Copy link
Member Author

@jmagman jmagman Feb 18, 2025

Choose a reason for hiding this comment

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

I could swap them both to compileSdk since compileSdkVersion is deprecated.
Never mind, that didn't make sense. I see what you mean.

@camsim99
Copy link
Contributor

Note from Android triage: @jmagman are you still working on this?

@jmagman jmagman force-pushed the all-flutter-compileSdkVersion branch from f53e99e to cd50629 Compare February 19, 2025 00:44
@jmagman jmagman marked this pull request as draft February 19, 2025 00:44
@Piinks
Copy link
Contributor

Piinks commented Apr 18, 2025

Greetings from stale PR triage 👋 @jmagman is this still on your radar?

@jmagman
Copy link
Member Author

jmagman commented May 27, 2025

Closing this, I haven't gotten back to it.

@jmagman jmagman closed this May 27, 2025
@jmagman
Copy link
Member Author

jmagman commented Jun 24, 2025

(Done in #9168)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-android Should be looked at in Android triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants