Repository navigation
Commit 40c34d2
Add regression test for plugin compileSdkExtension warning (flutter#191281)
## Description
This closes out flutter#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: flutter#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 flutter#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
- [x] I read the [Contributor
Guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md)
and followed the process outlined there for submitting PRs.
- [x] I read the [Tree
Hygiene](https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md)
wiki page, which explains my responsibilities.
- [x] I read and followed the [Flutter Style
Guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md).
- [x] I signed the [CLA](https://cla.developers.google.com/).
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making.
Fixes flutter#191081
Co-authored-by: Devasy Patel <[email protected]>
Co-authored-by: Reid Baker <[email protected]>
Co-authored-by: Camille Simon <[email protected]>1 parent e6f8019 commit 40c34d2
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
689 | 710 | | |
690 | 711 | | |
691 | 712 | | |
| |||
0 commit comments