amzn / kotlin-inject-anvil

Extensions for the kotlin-inject dependency injection framework
Apache License 2.0
271 stars 8 forks source link

Provide option to hide the merged interface #61

Closed vRallev closed 4 weeks ago

vRallev commented 1 month ago

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