giso
07/01/2021, 10:10 AMpublic.
I was wondering how this use case can be fulfilled with Kotlin. Maybe with a compiler plugin, which is only applied to the main module, granting higher visibility? Or more tightly scoped with a method annotation granting only this method a higher visibility?
What are you thoughts, or have I overlooked an already present solution?tmg
07/01/2021, 10:16 AMinternal then why do you need to wire it outside of the module? whatever depends on it should also be inside that very same module.tmg
07/01/2021, 10:17 AMOr more tightly scoped with a method annotation granting only this method a higher visibility?if there is such things as
@VisibleForTesting there could also be @VisibleForWiring I guess.wasyl
07/01/2021, 10:49 AMgiso
07/01/2021, 11:29 AMgiso
07/01/2021, 11:30 AMwasyl
07/01/2021, 11:34 AMimplementation and the API for that (interfaces) as api. So you’d expose implementations to the wiring module, but in app (or elsewhere) you’d depend not on the implementation module, but on the wiring modulegiso
07/01/2021, 11:40 AMgiso
07/01/2021, 11:44 AMgiso
07/01/2021, 11:45 AMwasyl
07/01/2021, 11:50 AM@WiringOnly or @VisibleForWiring annotation solution is the most reasonablegiso
07/01/2021, 11:57 AMrnett
07/01/2021, 6:20 PMRequiresOptIn annotation. It's more documentation than a hard forbid, but it should prevent inadvertent usages.giso
07/01/2021, 8:45 PM