Skip to content

Conversation

shs96c
Copy link
Collaborator

@shs96c shs96c commented Sep 29, 2025

This adds support for generating build files from Kotlin sources, as well as mixed Kotlin/Java sources. Language features which add implicit dependencies are supported via exports from the libraries that create them.

As with the existing java parser, the new KtParser relies on the tooling provided by JetBrains to accurately parse the source files.

A follow up PR is required to properly support test generation, because at the moment this will always generate a java_test_suite with Kotlin sources. For now, a "fix" for this is to override the java_test_suite with a custom mapping (eg. # gazelle:map_kind java_test_suite kt_jvm_test_suite //kotlin:defs.bzl) though it is clearly not ideal.

The initial work and heavy lifting was by Morgan Roff, but I've since continued working on this PR.

@shs96c shs96c force-pushed the kotlin-plugin-tidy-up branch 3 times, most recently from 2a12416 to f3df9aa Compare October 6, 2025 13:46
@shs96c shs96c force-pushed the kotlin-plugin-tidy-up branch from 58a6928 to ff58ca6 Compare October 6, 2025 14:47
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