KT-62518: Run kapt even when all dependencies are indirect - #5198
Closed
Christoph Loy (beatbrot) wants to merge 2 commits into
Closed
Christoph Loy (beatbrot) wants to merge 2 commits into
Christoph Loy (beatbrot) wants to merge 2 commits into
Conversation
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
Yahor Berdnikau (Tapchicoma)
self-requested a review
October 17, 2023 20:24
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 |
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. |
Contributor
|
LGTM! Merged into |
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.
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.