Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to hide the merged interface #61

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Provide option to hide the merged interface #61

merged 1 commit into from
Oct 28, 2024

Conversation

vRallev
Copy link
Contributor

@vRallev vRallev commented Oct 25, 2024

Until now it was required to add the merged interface as super type, e.g.

@Component
@MergeComponent(AppScope::class)
interface AppComponent : AppComponentMerged

With the new mechanism the @Component annotation and the super type can be omitted. In this case we will generate the final kotlin-inject component under the hood. This removes boilerplate and brings us closer to the original Anvil design. Further, this will help with #20 in KMP scenarios where generated code cannot be access from common code.

Resolves #8

@vRallev vRallev force-pushed the rwo/8 branch 2 times, most recently from 4ad6db0 to aed2ab6 Compare October 25, 2024 23:45
Base automatically changed from rwo/58 to main October 25, 2024 23:51
Until now it was required to add the merged interface as super type, e.g.
```
@component
@MergeComponent(AppScope::class)
interface AppComponent : AppComponentMerged
```

With the new mechanism the `@Component` annotation and the super type can be omitted. In this case we will generate the final kotlin-inject component under the hood. This removes boilerplate and brings us closer to the original Anvil design. Further, this will help with #20 in KMP scenarios where generated code cannot be access from common code.

Fixes #8
@vRallev vRallev marked this pull request as ready for review October 26, 2024 02:17
@vRallev vRallev requested a review from cahaverl October 26, 2024 02:17
@vRallev vRallev merged commit ee96b5e into main Oct 28, 2024
7 checks passed
@vRallev vRallev deleted the rwo/8 branch October 28, 2024 22:06
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.

Consider hiding the merged interface
2 participants