Skip to content

[Android] Migrate plugin to AGP 9 built-in Kotlin path#180

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/migrate-to-built-in-kotlin
Draft

[Android] Migrate plugin to AGP 9 built-in Kotlin path#180
Copilot wants to merge 2 commits into
masterfrom
copilot/migrate-to-built-in-kotlin

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown

This updates the Android plugin configuration to align with Flutter’s built-in Kotlin migration path for AGP 9 (android.builtInKotlin=true / android.newDsl=true). It also raises the package SDK floor required for this migration.

  • Android plugin Gradle migration (in_app_review/android/build.gradle)

    • Removed explicit Kotlin Gradle Plugin wiring (kotlin-gradle-plugin classpath and apply plugin: "kotlin-android").
    • Kept Android library plugin application and moved Kotlin JVM target to the new DSL via kotlin.compilerOptions.
  • Example Android app migration (in_app_review/example/android)

    • Removed Kotlin plugin declaration from settings.gradle.kts.
    • Removed id("kotlin-android") from app module plugins.
    • Replaced android.kotlinOptions with kotlin { compilerOptions { ... } }.
  • SDK floor updates (in_app_review/pubspec.yaml)

    • Updated minimums to:
      • Dart ^3.12.0
      • Flutter >=3.44.0
  • Release notes (in_app_review/CHANGELOG.md)

    • Added 2.0.13 entry documenting built-in Kotlin migration and Flutter/Dart minimum updates.
kotlin {
    compilerOptions {
        jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
    }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)
  • docs.flutter.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json
    • Triggering command: /dependabot-proxy /dependabot-proxy -o br-257704de8e9e -j DROP Root_G4.pem b16/log.json e00ba278a984ee89-id --global al_Root_CA.crt bash test (http block)
    • Triggering command: /dependabot-proxy /dependabot-proxy 1.pem /usr/bin/git test -e oot_CA.pem /usr/bin/git test cd09326e1acd335e/usr/sbin/iptables RSA4096_Root_G5.--wait 7f156f88269c.git-t 9ca479e384f8f1eafilter -e (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/britannio/in_app_review/sessions/83fc82be-e596-47e6-b92d-b5a2bb0c6770

Co-authored-by: britannio <33752528+britannio@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement built-in Kotlin migration for AGP 9 [Android] Migrate plugin to AGP 9 built-in Kotlin path May 20, 2026
Copilot AI requested a review from britannio May 20, 2026 14:17
MirceaX2Mobile added a commit to Stampino/barcode_scan2 that referenced this pull request Jul 1, 2026
Match the merged britannio/in_app_review#180 exactly: keep the AGP classpath in buildscript, remove the Kotlin classpath + ext.kotlin_version, remove kotlin-android entirely (no guard), keep main.java.srcDirs += src/main/kotlin, and add an unconditional top-level kotlin { compilerOptions { jvmTarget = JVM_17 } }. My earlier 353748f wrongly removed the AGP classpath, the src/main/kotlin srcDir, and the kotlin{} block.
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.

[Android] AGP 9 / built-in Kotlin compatibility

2 participants