Skip to content

Add regression test for plugin compileSdkExtension warning - #191281

Merged
auto-submit[bot] merged 6 commits into
flutter:masterfrom
Devasy:fix/compile-sdk-extension-warning-191081
Aug 31, 2026
Merged

auto-submit[bot] merged 6 commits into
flutter:masterfrom
Devasy:fix/compile-sdk-extension-warning-191081

Conversation

@Devasy

@Devasy Devasy commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

This closes out #191081. The bogus "compiles against Android SDK 2147483647" warning was caused by getCompileSdkFromProject parsing the deprecated compileSdkVersion platform-hash string ("android-36-ext19".substring(8).toIntOrNull() ?: Int.MAX_VALUE).

That codepath no longer exists: #190957 (part of the AGP 9.1.0 migration stack) already rewrote getCompileSdkFromProject to read AGP's typed compileSdk: Int? / compileSdkPreview: String? DSL properties directly. Since compileSdk never folds in the extension suffix, the failure mode in #191081 is now structurally impossible — no plugin's compileSdkExtension can leak into this comparison.

What was missing was test coverage for exactly this scenario (a plugin with compileSdkExtension set, as required by AARs with a minCompileSdkExtension metadata constraint — e.g. androidx.health.connect:connect-client). This PR adds that regression test to FlutterPluginUtilsTest.kt, confirming compileSdkExtension plays no part in the resulting CompileSdkVersion or in isHigherThan comparisons, so a future refactor can't reintroduce the bug.

No production code changes — this is test-only.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making.

Fixes #191081

…91081)

getCompileSdkFromProject was already fixed to read AGP's typed
compileSdk/compileSdkPreview DSL properties directly (landed in flutter#190957,
the AGP 9.1.0 migration's internal-utilities extraction), which
structurally sidesteps the bogus "compiles against Android SDK
2147483647" warning reported in flutter#191081 -- that bug came from parsing
the deprecated compileSdkVersion platform-hash string, which no
longer exists in this codepath.

No test covered the scenario the issue reported: a plugin with
compileSdkExtension set (required by AARs with a minCompileSdkExtension
constraint, e.g. androidx.health.connect:connect-client) alongside
compileSdk. Add one confirming compileSdkExtension plays no part in
the resulting CompileSdkVersion or in isHigherThan comparisons, so a
future refactor can't reintroduce this.

Fixes flutter#191081
@Devasy
Devasy requested a review from a team as a code owner August 18, 2026 17:38
@Devasy
Devasy requested review from camsim99 and removed request for a team August 18, 2026 17:38
@google-cla

google-cla Bot commented Aug 18, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new unit test getCompileSdkFromProject ignores compileSdkExtension to FlutterPluginUtilsTest.kt as a regression test for issue #191081. The test verifies that the compileSdkExtension property does not affect the reported compile SDK version. There are no review comments, and I have no feedback to provide.

@github-actions github-actions Bot added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Aug 18, 2026
@camsim99 camsim99 added the CICD Run CI/CD label Aug 18, 2026
@camsim99
camsim99 requested a review from reidbaker August 18, 2026 20:44
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Aug 19, 2026
@mboetger mboetger added the CICD Run CI/CD label Aug 25, 2026
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Aug 27, 2026
@reidbaker reidbaker added the CICD Run CI/CD label Aug 28, 2026
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Aug 31, 2026

@camsim99 camsim99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@camsim99 camsim99 added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Aug 31, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 31, 2026
Merged via the queue into flutter:master with commit 40c34d2 Aug 31, 2026
27 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 31, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Sep 1, 2026
flutter/flutter@c8c5e3b...0cbd1a4

2026-09-01 [email protected] Roll Skia from 6be7f8547c3c to 3911a1fe7f7a (1 revision) (flutter/flutter#192110)
2026-09-01 [email protected] Roll Fuchsia Linux SDK from EPzxifoyt36b5qiBy... to idslm9FikVLy2K_A-... (flutter/flutter#192104)
2026-09-01 [email protected] Roll Skia from 47df2ae3226c to 6be7f8547c3c (1 revision) (flutter/flutter#192103)
2026-09-01 [email protected] Roll Skia from e22ebf131e44 to 47df2ae3226c (4 revisions) (flutter/flutter#192099)
2026-09-01 [email protected] Roll Skia from 5489a16a5998 to e22ebf131e44 (5 revisions) (flutter/flutter#192093)
2026-09-01 [email protected] [flutter_tools] Safely handle broken symlinks and existing files during plugin symlink creation (flutter/flutter#191496)
2026-09-01 [email protected] Support wide gamut colors in gradient_generator's CreateGradientTexture (flutter/flutter#191980)
2026-09-01 [email protected] Clean up semantics code (flutter/flutter#191620)
2026-08-31 [email protected] Add website documentation item to PR pre-launch checklist (flutter/flutter#192080)
2026-08-31 [email protected] [windows] Fix null-deref in HostWindowPopup::UpdatePosition (Fixes #191478) (flutter/flutter#191479)
2026-08-31 [email protected] Removes deprecated ignoreSemantics parementers (flutter/flutter#191493)
2026-08-31 [email protected] Roll Dart SDK from b319095e317b to 9164def35347 (1 revision) (flutter/flutter#192073)
2026-08-31 [email protected] test: dynamic _tapOutside helper for TapRegion navigation tests (flutter/flutter#185397)
2026-08-31 [email protected] [Windows] fix: Remove quotes from compiler warning suppression (flutter/flutter#190873)
2026-08-31 [email protected] Migrate to listen package (flutter/flutter#189111)
2026-08-31 [email protected] Roll Skia from 15db98a90bbd to 5489a16a5998 (2 revisions) (flutter/flutter#192070)
2026-08-31 [email protected] Add regression test for plugin compileSdkExtension warning (flutter/flutter#191281)
2026-08-31 [email protected] Explicitly disable HCPP in platform view benchmarks and integration tests (flutter/flutter#191908)
2026-08-31 [email protected] Documentation and script for Gradle Distribution cache for CI (flutter/flutter#190323)
2026-08-31 [email protected] Roll Skia from 5549c93c9a1c to 15db98a90bbd (2 revisions) (flutter/flutter#192068)
2026-08-31 [email protected] Roll Packages from cd4cdd0 to d642322 (7 revisions) (flutter/flutter#192063)
2026-08-31 [email protected] Roll Dart SDK from 48f641e8b249 to b319095e317b (1 revision) (flutter/flutter#192061)
2026-08-31 [email protected] [tool] Migrate dev/tools from dart_skills_lint to skills_lint package (flutter/flutter#191997)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…r#12712)

flutter/flutter@c8c5e3b...0cbd1a4

2026-09-01 [email protected] Roll Skia from 6be7f8547c3c to 3911a1fe7f7a (1 revision) (flutter/flutter#192110)
2026-09-01 [email protected] Roll Fuchsia Linux SDK from EPzxifoyt36b5qiBy... to idslm9FikVLy2K_A-... (flutter/flutter#192104)
2026-09-01 [email protected] Roll Skia from 47df2ae3226c to 6be7f8547c3c (1 revision) (flutter/flutter#192103)
2026-09-01 [email protected] Roll Skia from e22ebf131e44 to 47df2ae3226c (4 revisions) (flutter/flutter#192099)
2026-09-01 [email protected] Roll Skia from 5489a16a5998 to e22ebf131e44 (5 revisions) (flutter/flutter#192093)
2026-09-01 [email protected] [flutter_tools] Safely handle broken symlinks and existing files during plugin symlink creation (flutter/flutter#191496)
2026-09-01 [email protected] Support wide gamut colors in gradient_generator's CreateGradientTexture (flutter/flutter#191980)
2026-09-01 [email protected] Clean up semantics code (flutter/flutter#191620)
2026-08-31 [email protected] Add website documentation item to PR pre-launch checklist (flutter/flutter#192080)
2026-08-31 [email protected] [windows] Fix null-deref in HostWindowPopup::UpdatePosition (Fixes #191478) (flutter/flutter#191479)
2026-08-31 [email protected] Removes deprecated ignoreSemantics parementers (flutter/flutter#191493)
2026-08-31 [email protected] Roll Dart SDK from b319095e317b to 9164def35347 (1 revision) (flutter/flutter#192073)
2026-08-31 [email protected] test: dynamic _tapOutside helper for TapRegion navigation tests (flutter/flutter#185397)
2026-08-31 [email protected] [Windows] fix: Remove quotes from compiler warning suppression (flutter/flutter#190873)
2026-08-31 [email protected] Migrate to listen package (flutter/flutter#189111)
2026-08-31 [email protected] Roll Skia from 15db98a90bbd to 5489a16a5998 (2 revisions) (flutter/flutter#192070)
2026-08-31 [email protected] Add regression test for plugin compileSdkExtension warning (flutter/flutter#191281)
2026-08-31 [email protected] Explicitly disable HCPP in platform view benchmarks and integration tests (flutter/flutter#191908)
2026-08-31 [email protected] Documentation and script for Gradle Distribution cache for CI (flutter/flutter#190323)
2026-08-31 [email protected] Roll Skia from 5549c93c9a1c to 15db98a90bbd (2 revisions) (flutter/flutter#192068)
2026-08-31 [email protected] Roll Packages from cd4cdd0 to d642322 (7 revisions) (flutter/flutter#192063)
2026-08-31 [email protected] Roll Dart SDK from 48f641e8b249 to b319095e317b (1 revision) (flutter/flutter#192061)
2026-08-31 [email protected] [tool] Migrate dev/tools from dart_skills_lint to skills_lint package (flutter/flutter#191997)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…r#12712)

flutter/flutter@c8c5e3b...0cbd1a4

2026-09-01 [email protected] Roll Skia from 6be7f8547c3c to 3911a1fe7f7a (1 revision) (flutter/flutter#192110)
2026-09-01 [email protected] Roll Fuchsia Linux SDK from EPzxifoyt36b5qiBy... to idslm9FikVLy2K_A-... (flutter/flutter#192104)
2026-09-01 [email protected] Roll Skia from 47df2ae3226c to 6be7f8547c3c (1 revision) (flutter/flutter#192103)
2026-09-01 [email protected] Roll Skia from e22ebf131e44 to 47df2ae3226c (4 revisions) (flutter/flutter#192099)
2026-09-01 [email protected] Roll Skia from 5489a16a5998 to e22ebf131e44 (5 revisions) (flutter/flutter#192093)
2026-09-01 [email protected] [flutter_tools] Safely handle broken symlinks and existing files during plugin symlink creation (flutter/flutter#191496)
2026-09-01 [email protected] Support wide gamut colors in gradient_generator's CreateGradientTexture (flutter/flutter#191980)
2026-09-01 [email protected] Clean up semantics code (flutter/flutter#191620)
2026-08-31 [email protected] Add website documentation item to PR pre-launch checklist (flutter/flutter#192080)
2026-08-31 [email protected] [windows] Fix null-deref in HostWindowPopup::UpdatePosition (Fixes #191478) (flutter/flutter#191479)
2026-08-31 [email protected] Removes deprecated ignoreSemantics parementers (flutter/flutter#191493)
2026-08-31 [email protected] Roll Dart SDK from b319095e317b to 9164def35347 (1 revision) (flutter/flutter#192073)
2026-08-31 [email protected] test: dynamic _tapOutside helper for TapRegion navigation tests (flutter/flutter#185397)
2026-08-31 [email protected] [Windows] fix: Remove quotes from compiler warning suppression (flutter/flutter#190873)
2026-08-31 [email protected] Migrate to listen package (flutter/flutter#189111)
2026-08-31 [email protected] Roll Skia from 15db98a90bbd to 5489a16a5998 (2 revisions) (flutter/flutter#192070)
2026-08-31 [email protected] Add regression test for plugin compileSdkExtension warning (flutter/flutter#191281)
2026-08-31 [email protected] Explicitly disable HCPP in platform view benchmarks and integration tests (flutter/flutter#191908)
2026-08-31 [email protected] Documentation and script for Gradle Distribution cache for CI (flutter/flutter#190323)
2026-08-31 [email protected] Roll Skia from 5549c93c9a1c to 15db98a90bbd (2 revisions) (flutter/flutter#192068)
2026-08-31 [email protected] Roll Packages from cd4cdd0 to d642322 (7 revisions) (flutter/flutter#192063)
2026-08-31 [email protected] Roll Dart SDK from 48f641e8b249 to b319095e317b (1 revision) (flutter/flutter#192061)
2026-08-31 [email protected] [tool] Migrate dev/tools from dart_skills_lint to skills_lint package (flutter/flutter#191997)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin with compileSdkExtension triggers bogus "compiles against Android SDK 2147483647" warning

4 participants