[WIP] Added warning against migration to built-in kotlin - #13634
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds warning callouts to the Kotlin migration documentation to clarify that the migration is only relevant for projects already using the Kotlin Gradle Plugin (KGP). The reviewer suggested rephrasing these warnings across all three files to specify that the migration itself is what only applies to KGP-using projects, rather than the entire guide, which resolves contradictions and ensures accuracy.
|
Staged preview of the updated docs.flutter.dev site (updated for commit b3605d7): https://flutter-docs-prod--docs-pr13634-migration-warning-1du7aw2r.web.app |
|
Staged preview of the updated flutter.dev site (updated for commit b3605d7): https://flutter-dev-230821--www-pr13634-migration-warning-ug8ucv7l.web.app |
|
Can the warning also mention what it means to "apply KGP"? Something like "If your project doesn't currently apply KGP (ie your gradle file doesn't have a line like |
| :::warning | ||
| This guide only applies to apps that already use the | ||
| Kotlin Gradle Plugin (KGP). | ||
| If your project doesn't currently apply KGP, |
There was a problem hiding this comment.
How will they know if their project applies KGP?
There was a problem hiding this comment.
Devs can check if their project applies KGP by looking at their build.gradle(.kts) file. Instructions on how to identify and locate KGP already exist in the doc for app devs and plugin authors. I can just add something like that in the warning at the top of the doc for app devs and plugin authors.
| This guide only applies to apps that already use the | ||
| Kotlin Gradle Plugin (KGP). |
There was a problem hiding this comment.
What about the requirement to add android.newDsl=false mentioned in the next section? Do apps that don't use KGP or add-to-app apps need to add that either way?
There was a problem hiding this comment.
android.newDsl=false is completely separate from KGP/migrating to built-in kotlin. Whether or not an app is applying KGP, android.newDsl=false must be set to succesfully build an app using AGP 9. So there are technically two parts to successfully building on AGP 9:
- migrate to built-in kotlin (if applicable)
android.newDslisfalse(this only has to be manually set for add-to-app scenarios)
This guide is specifically for those migrating to built-in kotlin. I do think the above^ is important to communicate. Any guidance for how to communicate it? (as a part of this guide? another doc?).
…lt-in-kotlin/for-plugin-authors.md Co-authored-by: Parker Lougheed <parlough@gmail.com>
DO NOT MERGE
Added warning against migrating to built-in kotlin if project does not currently use KGP. Also added apps should be on AGP 9+ when validating migration.
Presubmit checklist
of 80 characters or fewer.