[AGP 9] Ensure Warnings Do Not Log When AGP Is Below 9#188373
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces logic to fetch the Android Gradle Plugin (AGP) version and skip logging Kotlin Gradle Plugin warnings if the AGP version is null or less than 9, along with corresponding unit tests. The reviewer points out that fetching the AGP version during the configuration phase is unreliable and suggests moving this check inside the projectsEvaluated block. Additionally, the reviewer notes that some of the newly added test mocks in FlutterPluginTest.kt will become redundant and should be removed if this change is implemented.
…stubbed in FlutterPluginTest as applying FGP happens much earlier in lifecycle
update to all projects have been evaluated
… createMockSubproject
…tead of hardcoding 8
…he flutter tooling. this value has to be adjusted manually
| """ | ||
| plugins { | ||
| id("com.android.application") | ||
| val pluginsBlock = |
There was a problem hiding this comment.
in a comment can you give the expected output string for "pluginsBlock". I think it will help with understandability.
| plugins { | ||
| id("com.android.library") | ||
| id("kotlin-android") | ||
| val legacyBlock = |
There was a problem hiding this comment.
Avoid temporal words like legacy. https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#avoid-newold-modifiers-in-code
…not the major version.
Warnings to migrate to built-in kotlin should not log when AGP is below 9. This should be CP'ed to the current stable and beta. This is an effort to split this large PR: #187534 (comment)
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.