ursus
10/07/2025, 5:38 PMRobert Jaros
10/07/2025, 5:39 PMjw
10/07/2025, 5:39 PMursus
10/07/2025, 5:44 PMjw
10/07/2025, 5:45 PMursus
10/07/2025, 5:45 PMRobert Jaros
10/07/2025, 5:46 PMjw
10/07/2025, 5:46 PMRobert Jaros
10/07/2025, 5:48 PMursus
10/07/2025, 5:48 PMmetro DI code for it to pick up with ksp, to make certain cases a bit nicer
would you not do this in ksp?jw
10/07/2025, 5:50 PMursus
10/07/2025, 5:54 PM@Inject
@SingleIn(UserScope::class)
@ContributesIntoSet(UserScope::class)
@QualifierFor(UserScope::class)
class SecondPlugin(
private val logger: LOG
) : Plugin {
override fun initialize() {
logger.d(message = "Hello I'm SecondPlugin")
}
}
in pure metro, but as you can see the UserScope parameter duplicated, so I was thinking of having something like
@Inject
@PluginIn(UserScope::class)
class SecondPlugin(
private val logger: LOG
) : Plugin {
override fun initialize() {
logger.d(message = "Hello I'm SecondPlugin")
}
}
which would then be picked up by my processor & would emit the "what used to be @Module in dagger" syntax to add the rest from the first sample to make it functionally equivalent
-- and Metro doesnt allow to plug custom processing in, so I was thinking ksp completely on top of metro (before metro)
and im thinking ksp only because I was told compiler plugins are hardcore 😄jw
10/07/2025, 5:58 PM@PluginId with the 3 other annotations directly. And then you'd emit a plugin ordering compiler argument to ensure you run before Metro (again, on Kotlin 2.3+ only).jw
10/07/2025, 5:58 PMursus
10/07/2025, 6:01 PMDaggerXComponent literal even work, I don't remember it being red after a fresh clone - but I might be mistaken
thanks!Rafael Diaz
10/07/2025, 6:27 PM} catch (e: FileAlreadyExistsException) {
e.file.writeBytes(content)
}
Which is a bit hackish I admit.Rafael Diaz
10/07/2025, 6:27 PMprivate visibility across multiple modules, but I do not find a pressing need to support it for my personal use case.Rafael Diaz
10/07/2025, 6:28 PMephemient
10/07/2025, 10:40 PMephemient
10/07/2025, 10:40 PMephemient
10/07/2025, 10:41 PM