Skip to content

Support AGP kotlin variant sources #2494

Description

@CharlieTap

AGP has two apis for registering generated code:

variant.sources.java?.addGeneratedSourceDirectory

and

variant.sources.kotlin?.addGeneratedSourceDirectory

If we use the latter KSP does not pick up sources generated.

I had a quick look and I think its relates to this line in particular

val sources = kotlinCompilation.androidVariant.getSourceFolders(SourceKind.JAVA)

Metadata

Metadata

Assignees

Labels

GradleIssues with KSP Gradle Plugin, AGP or Gradle.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions