Rudy Sulley
05/29/2026, 12:18 PMimpl and api submodules and have the feature modules depend on the needed api module.
Something in me just doesn't sit right with that recommendation.
What are you thoughts and how are you approaching this.efemoney
05/30/2026, 1:26 AMdata object LocationsListScreen
data class LocationDetailScreen(val id: LocationId)
Anyone that needs to open a screen needs to do so by specifying this key. For them to have access to the key they need to have access to those classes. Now, there are two ways: either put all keys in a singular common module that rest of the app has access to OR each small unit of the app exposes their key in some way.
If you do the former you will very soon (in a medium to large app) run into issues with scaling such an approach. The latter is what is recommended in the docs.
Now, another way to target screens, that could stand as a substitute for keys with support for parameters is deep links. So if exposing keys in public api is not desirable for your project, just support a mapping from deep link to key and use deep links insteadblakelee
05/30/2026, 8:14 AMRyan Payne
05/30/2026, 1:03 PMSomething in me just doesn't sit right with that recommendation.What in particular does not "sit right" with you? Is it simply that it's a new and unfamiliar concept? @fal was wrestling with the same concept in https://kotlinlang.slack.com/archives/CJLTWPH7S/p1778668709954829. He got some good feedback from the community. In my experience, the
api / impl module pattern is by far the most maintainable approach. It scales well as the app and team maintaining it grows.
I've also followed the approach you mentioned—bubbling events up to a central module—and that's never scaled well. I've employed the api / impl approach on multiple apps that I've worked on as of late with good success.Rudy Sulley
05/31/2026, 5:56 PMursus
06/03/2026, 10:26 PMblakelee
06/03/2026, 10:28 PMursus
06/03/2026, 10:33 PMblakelee
06/03/2026, 10:34 PMursus
06/03/2026, 10:44 PMblakelee
06/03/2026, 10:45 PMcom.android.library for instance, it would just be kotlin("jvm")ursus
06/03/2026, 10:50 PMursus
06/06/2026, 10:14 PMblakelee
06/06/2026, 10:16 PMursus
06/06/2026, 10:26 PMblakelee
06/06/2026, 10:27 PMursus
06/06/2026, 10:28 PMblakelee
06/06/2026, 10:28 PMursus
06/06/2026, 10:30 PMursus
06/06/2026, 10:33 PMblakelee
06/06/2026, 10:35 PMRudy Sulley
06/25/2026, 6:23 PMMaksym M.
06/27/2026, 4:10 PM{contract, domain, data, impl, ui}, with rules for interdependencies provisioned via konsist,
{contract, ui} are public api surface, impl is only depended on by aggregate app nodes, {domain, data} are internal to the feature
Ui specific and local to the feature goes into impl along with state holders and bindings while reusable ui components specific to the feature aka not design system elements go into ui, so far this has been working great allowing for unification of the overall code base on several layers