Skip to content

Consume all Kotlin sources in KSP to support other code generators#3001

Merged
hfmehmed merged 1 commit into
google:mainfrom
hfmehmed:consumer-all-kotlin-sources
Jun 24, 2026
Merged

Consume all Kotlin sources in KSP to support other code generators#3001
hfmehmed merged 1 commit into
google:mainfrom
hfmehmed:consumer-all-kotlin-sources

Conversation

@hfmehmed

@hfmehmed hfmehmed commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This change updates KSP to consume sources.kotlin.all instead of sources.kotlin.static (these are both AGP APIs). This ensures KSP can process Kotlin sources generated by other plugins or tasks in the build that are registered with AGP itself.

Since KSP's own generated outputs (both Java and Kotlin) are registered to sources.java, they do not appear in sources.kotlin.all. This avoids introducing circular dependencies while still allowing KSP to consume other generated Kotlin sources.

Fixes #2494

@hfmehmed hfmehmed force-pushed the consumer-all-kotlin-sources branch from 0a2a87b to b4102b5 Compare June 23, 2026 17:23

@jaschdoc jaschdoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Before I approve, could you provide some more context as to what the issue is (in addition to the fact that KSP doesn't pick up sources generated by in other ways than KSP)? :)

@hfmehmed hfmehmed force-pushed the consumer-all-kotlin-sources branch from b4102b5 to 11f80cf Compare June 24, 2026 10:20
@hfmehmed

Copy link
Copy Markdown
Collaborator Author

Before I approve, could you provide some more context as to what the issue is (in addition to the fact that KSP doesn't pick up sources generated by in other ways than KSP)? :)

Updated the description of the PR.

@hfmehmed hfmehmed merged commit 4aaec8a into google:main Jun 24, 2026
24 checks passed
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.

Support AGP kotlin variant sources

3 participants