Skip to content

Migrate to built-in Kotlin - #5

Merged
TomHa-Apadmi merged 9 commits into
developfrom
feature/bump-kotlin
Jun 3, 2026
Merged

Migrate to built-in Kotlin#5
TomHa-Apadmi merged 9 commits into
developfrom
feature/bump-kotlin

Conversation

@TomHa-Apadmi

Copy link
Copy Markdown
Member
  • Migrates plugin to use the version of Kotlin built-in to AGP.
  • Adds support for AGP 9.X.
  • Raises minimum Flutter SDK version to 3.44.0
  • Bumps Android dependencies.

Comment thread example/android/gradle.properties

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the plugin and its example project to align with newer Flutter/Android toolchains by moving to AGP 9.x (and intended “built-in Kotlin”), updating Gradle/AGP versions, and raising the minimum supported Flutter SDK.

Changes:

  • Raised minimum Flutter SDK to 3.44.0 and updated Dart SDK constraints.
  • Upgraded Android build tooling (AGP 9.2.1, Gradle 9.5.1) and Java/Kotlin JVM target to 21.
  • Updated Android dependencies and added a new changelog entry for the next release.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pubspec.yaml Raises Dart/Flutter environment constraints.
example/pubspec.yaml Updates example’s Dart/Flutter environment constraints.
example/pubspec.lock Regenerated lockfile to reflect updated SDK constraints and dependency resolution.
example/android/settings.gradle.kts Upgrades AGP/Kotlin plugin management versions for the example build.
example/android/gradle/wrapper/gradle-wrapper.properties Upgrades the example’s Gradle wrapper to 9.5.1.
example/android/gradle.properties Adds Flutter migrator flags for the example build.
example/android/app/build.gradle.kts Removes explicit Kotlin plugin and updates JVM targets to 21.
CHANGELOG.md Adds a 1.1.0 changelog entry describing the migration.
android/settings.gradle Migrates to pluginManagement-based setup and sets AGP version for the plugin build.
android/gradle/wrapper/gradle-wrapper.properties Upgrades the plugin’s Gradle wrapper to 9.5.1.
android/gradle.properties Adds AGP/Flutter migrator flags for the plugin Android build.
android/build.gradle Removes explicit Kotlin/AGP classpath config, updates compileSdk/JVM targets, and bumps dependencies.
.fvmrc Pins Flutter to 3.44.0 for local development via FVM.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread android/gradle.properties
Comment thread android/build.gradle Outdated
Comment thread android/build.gradle Outdated
Comment thread CHANGELOG.md
Comment thread example/android/gradle.properties
Comment thread example/android/settings.gradle.kts Outdated
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("com.android.application") version "9.2.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.21" apply false
Comment thread example/android/app/build.gradle.kts Outdated
Comment thread android/build.gradle Outdated
implementation("com.scottyab:rootbeer-lib:0.1.1")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.mockito:mockito-core:5.0.0")
implementation("com.scottyab:rootbeer-lib:0.1.2")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One for a future PR, but these should probably go into a versions.toml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ye, I think that requires migrating to a new DSL, which I'm minded to do, I just didn't want to compund this diff

@TomHa-Apadmi

Copy link
Copy Markdown
Member Author

Going to put this PR on hold for a bit. The line you commented on @patrickcapadmi was actually vetoing built-in Kotlin for the whole project so the build doesn't really work.
I'm minded to wait for a reference implementation from a first-party Flutter plugin as I can't figure out what causes Gradle to fail to sync when built-in Kotlin is enabled.

@TomHa-Apadmi
TomHa-Apadmi marked this pull request as draft May 27, 2026 10:43
@TomHa-Apadmi
TomHa-Apadmi marked this pull request as ready for review June 1, 2026 14:39
@TomHa-Apadmi
TomHa-Apadmi merged commit 85e541d into develop Jun 3, 2026
1 check passed
@TomHa-Apadmi
TomHa-Apadmi deleted the feature/bump-kotlin branch June 3, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants