mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Dagger: start setup
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.inject)
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package io.element.android.x.anvilannotations
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
* Adds view model to the specified component graph.
|
||||
* Equivalent to the following declaration in a dagger module:
|
||||
*
|
||||
* @Binds
|
||||
* @IntoMap
|
||||
* @ViewModelKey(YourViewModel::class)
|
||||
* public abstract fun bindYourViewModelFactory(factory: YourViewModel.Factory): AssistedViewModelFactory<*, *>
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class ContributesViewModel(
|
||||
val scope: KClass<*>,
|
||||
)
|
||||
Reference in New Issue
Block a user