Skip to content

Migrate Android modules to AGP built-in Kotlin [CLF-657] - #1587

Merged
zach-klippenstein merged 4 commits into
mainfrom
zachklipp/clf-657-migrate-workflow-kotlin-to-agp-built-in-kotlin
Oct 29, 2026
Merged

zach-klippenstein merged 4 commits into
mainfrom
zachklipp/clf-657-migrate-workflow-kotlin-to-agp-built-in-kotlin

Conversation

@zach-klippenstein

Copy link
Copy Markdown
Collaborator

Gradle sync warned on every Android module: "The 'org.jetbrains.kotlin.android' plugin in project ':workflow-ui:radiography' is no longer required for Kotlin support since AGP 9.0." This turns AGP 9's built-in Kotlin back on and stops applying the KGP Android plugin.

  • gradle.properties: drop android.builtInKotlin=false. android.newDsl=false stays; the new DSL is a separate migration.
  • KotlinAndroidConventionPlugin no longer applies org.jetbrains.kotlin.android. It still applies the shared Kotlin settings (toolchain, explicit API, wf1- module names, warnings as errors), which AGP's built-in compile tasks pick up.
  • The two com.android.test benchmarks drop their direct org.jetbrains.kotlin.android line.
  • shardConnectedChecks used the KGP plugin to find Android projects; it now checks AGP's plugin IDs.

The convention plugin's ID changes from kotlin-android to kotlin-android-conventions. kotlin-android is also KGP's legacy plugin ID, and AGP's built-in Kotlin calls findPlugin("kotlin-android") to read the KGP version for compiler-plugin artifacts. With our plugin registered under that ID, AGP got no version back and Compose and parcelize failed to resolve (kotlin-compose-compiler-plugin-embeddable: with an empty version). That rename is why most build scripts appear in the diff.

Remaining sync warnings are pre-existing: the android.newDsl=false deprecation and the matching android { } accessor deprecations.

Testing

  • ./gradlew help --warning-mode=all configures every project with no "no longer required" warnings.
  • ./gradlew assembleDebug assembleDebugAndroidTest compileDebugUnitTestKotlin succeeds.
  • :workflow-tracing:testDebugUnitTest passes.
  • ktfmtCheck passes for the main build and build-logic.

🤖 Generated with Claude Code

AGP 9 compiles Kotlin itself, so applying org.jetbrains.kotlin.android
triggers a "no longer required" warning on every Android module during
Gradle sync. Re-enable built-in Kotlin and stop applying the KGP Android
plugin from the convention plugin and the two com.android.test benchmarks.

The convention plugin's ID changes from kotlin-android to
kotlin-android-conventions: AGP calls findPlugin("kotlin-android") to read
the KGP version for compiler plugin artifacts, and our plugin shadowed it,
so Compose and parcelize resolved with an empty version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zach-klippenstein
zach-klippenstein requested a review from a team as a code owner October 28, 2026 21:27
@zach-klippenstein
zach-klippenstein merged commit 9fdef66 into main Oct 29, 2026
76 checks passed
@zach-klippenstein
zach-klippenstein deleted the zachklipp/clf-657-migrate-workflow-kotlin-to-agp-built-in-kotlin branch October 29, 2026 02:38
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.

2 participants