File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Migration to Metro
2
+
3
+ The dependency injection library is now [ Metro] ( https://zacsweers.github.io/metro/latest/ ) . It replaces both Dagger and Anvil.
4
+
5
+ Migration of the current Element X code has been performed in https://github.com/element-hq/element-x-android/pull/5253 .
6
+
7
+ To migrate other existing code you will need to:
8
+
9
+ - replace ` setupAnvil() ` with ` setupDependencyInjection() ` in your ` build.gradle.kts ` files
10
+ - replace the Dagger and Anvil imports with Metro ones
11
+ - move the ` @Inject ` apply to the constructor to the class itself (only applicable if there is only one primary constructor
12
+ - replace ` @AssistedInject ` with ` @Inject `
13
+ - replace ` @Module ` with ` @BindingContainer `
14
+
15
+ This should help to migrate your existing code.
You can’t perform that action at this time.
0 commit comments