Skip to content

KT-62518: Run kapt even when all dependencies are indirect - #5198

Closed
Christoph Loy (beatbrot) wants to merge 2 commits into
JetBrains:masterfrom
beatbrot:KT-62518
Closed

Christoph Loy (beatbrot) wants to merge 2 commits into
JetBrains:masterfrom
beatbrot:KT-62518

Conversation

@beatbrot

Copy link
Copy Markdown
Contributor

Previously, kapt skipped the execution, if the "kapt" configuration had
no direct dependencies (via kapt.dependencies.isEmpty()).
This lead to kapt not working, if all
annotation processors are declared in a super-configuration of kapt.

With this change, we also consider super-configurations
(via kapt.allDependencies.isEmpty) and fix the described bug.

@beatbrot
Christoph Loy (beatbrot) marked this pull request as ready for review October 11, 2023 13:00
Previously, kapt skipped the execution, if the "kapt" configuration had
no direct dependencies (via `kapt.dependencies.isEmpty()`).
This lead to kapt not working, if all
annotation processors are declared in a super-configuration of kapt.

With this change, we also consider super-configurations
(via `kapt.allDependencies.isEmpty`) and fix the described bug.

^KT-62518 Fixed
@Tapchicoma

Copy link
Copy Markdown
Contributor

Could you also add Gradle integration test to ensure kapt generate stubs and kapt tasks are executed in this configuration with common apt configuration? Check Kapt3IT class for examples and place where to put such test. If you have some questions - feel free to ask in this PR.

@beatbrot

Copy link
Copy Markdown
Contributor Author

Yahor Berdnikau (@Tapchicoma) Done :) Feel free to comment on the test, if this is not what you wanted. I also verified, that the test fails when I revert my change.

@Tapchicoma

Copy link
Copy Markdown
Contributor

LGTM! Merged into master as commit cf8b419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants