Repository navigation
fix: AGP 9's built-in Kotlin; release skill - #21
Merged
Merged
Conversation
The steps that publish a version: bump and changelog, publishPlugins, a Portal-only check, tag and GitHub release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kotlinNativeDistribution() took the Kotlin version only when a Kotlin
plugin id was applied. Built-in Kotlin applies none, only the kotlin
extension, so an Android module got the plugin's default version
(2.4.20) instead of its own (AGP 9.2.1's 2.2.10). The version now comes
from the extension, asked lazily so plugin order does not matter.
JNI bindings are Kotlin. In a module with android { enableKotlin = false }
AGP keeps the Kotlin source directory but registers no Kotlin compile, so
the bindings were never compiled and Java callers could not find them.
Configuring such a variant's build now fails, naming enableKotlin and
ffm() as the ways out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linux x64's distribution is kotlin-native-prebuilt-linux-x86_64-… Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kotlinNativeDistribution()in built-in Kotlin modules. AGP 9 compiles Kotlin without applyingorg.jetbrains.kotlin.android; it only registers thekotlinextension. The plugin detected Kotlin by plugin id, so an Android-only module got the plugin's default version (2.4.20) instead of its own (2.2.10 with AGP 9.2.1). The version is now read from thekotlinextension, lazily, so the order ofplugins { }no longer matters.GradlePluginId.KOTLIN_ANDROIDis gone.android { enableKotlin = false }, AGP keepsvariant.sources.kotlinbut registers nocompile<Variant>Kotlin, so generated JNI bindings were silently never compiled. Configuringpre<Variant>Buildnow fails with: JNI bindings are Kotlin, and variant 'debug' compiles none (android { enableKotlin = false }?). Enable Kotlin, or call ffm() in the binding for Java bindings..claude/skills/release/SKILL.md): bump and changelog,publishPlugins, a Portal-only check, then tag and GitHub release.Tests
kotlinNativeDistribution()names AGP's KGP version in both plugin orders. It fails on the old code (…-2.4.20).enableKotlin = falsewith a JNI binding fails configuration with the message; with Kotlin on, the same module configures.-PtestGradleVersion=8.7 -PkgpTestVersion=2.0.0) 64 / 7 skipped, where the AGP 9 tests skip.examples/androidandexamples/kmpconfigure (--dry-run).🤖 Generated with Claude Code