- Add this to your build:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation 'com.github.blinkist.dagger2-shaded:dagger2-shaded-library:2.27'
kapt 'com.github.blinkist.dagger2-shaded:dagger2-shaded-compiler:2.27'
}
- Play with Dagger 1 and Dagger 2 at the same time:
class MyClass @Inject @Inject2 constructor() {
...
}
-
???
-
Profit.
📚 You can read more about it here: https://proandroiddev.com/dagger-1-and-dagger-2-together-917f082b3dd9
➕And you might also be interested in this: https://github.com/blinkist/AssistedInject
- Change the
dagger.version
property in the parent POM to the desired value. - Run
mvn package
to generate the JARs and use them directly in your project. - ...or make the changes in a fork and use JitPack. And open a PR if it's a new version!