[AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin#11806
[AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin#11806jesswrd wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates multiple Android example apps to use Flutter's built-in Kotlin support, upgrading Gradle to version 9.1.0, updating Android and Kotlin plugin versions, and replacing deprecated kotlinOptions with the new kotlin compiler options block. Review feedback indicates that the android.builtInKotlin and android.newDsl flags in gradle.properties must be set to true instead of false to ensure Kotlin compilation is correctly applied and prevent build failures.
There was a problem hiding this comment.
Code Review
This pull request updates multiple example Android applications and validation tests to upgrade Gradle to 9.1.0, the Android Gradle Plugin to 9.0.1, and Kotlin to 2.3.20. It removes the kotlin-android plugin and migrates kotlinOptions to the new kotlin compiler options block targeting JVM 17. Feedback across several files indicates that setting android.builtInKotlin and android.newDsl to false in gradle.properties will cause build failures since the kotlin-android plugin was removed. These flags should be updated to true to enable built-in Kotlin support.
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.
Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.
Please update this flag to true across all gradle.properties files in this PR.
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true
|
@stuartmorgan-g I noticed there aren't really any existing validators for configurations like |
I'm pretty sure I just missed adding some validation when I was doing the Kotlin gradle migrations. As I'm sure you're well aware by now, keeping track of which things are in which variants and which ones have been validated is... nontrivial :) |
Migrate remaining example apps to built-in kotlin.
Fixes flutter/flutter#187325
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2