Description
This change would adds @target(AnnotationTarget.VALUE_PARAMETER) to the @dispatcher qualifier to explicitly limit its usage to constructor/function parameters.
This removes Kotlin’s use-site target warnings, improves clarity.
I believe Kotlin 2.2 uses param by default it makes it more predictable in Hilt.
(Alternatively, we can add @param e.g @param:Dispatcher(IO), but having @target reduces boilerplate)
Any suggestion for writing a test for this?
@Target(AnnotationTarget.PROPERTY_SETTER)
@Qualifier
@Retention(RUNTIME)
annotation class Dispatcher(val niaDispatcher: NiaDispatchers)
enum class NiaDispatchers {
Default,
IO,
}