Found `@SingleIn` in Anvil's sample. I wonder will...
# squarelibraries
d
Found
@SingleIn
in Anvil's sample. I wonder will dagger differentiate
@SingleIn(Scope1::class)
and
@SingleIn(Scope2::class)
during code generation (and after) as different scopes? JSR docs seem to mention that
@Scope
-ed annotations shouldn't have attributes, so I thought does this mean dagger will look only at annotation name?
z
it does differentiate
👍 1
t
I have never seen this, is it isolated to D1 or something present in D2 as well? Looks an awful lot like something near the shape of scope private bindings
z
it's a custom construct, nothing fancy
we do it too
Copy code
/**
 * Indicates that this provided type (via [Provides], [Binds], [Inject], etc) will only have a single instance within
 * the target [value] scope.
 *
 * Note that the [value] does not actually need to be a [Scope]-annotated annotation class. It is _solely_ a key.
 */
@Scope
@MustBeDocumented
@Retention(RUNTIME)
annotation class SingleIn(val value: KClass<*>)
❤️ 1
t
TY sir