/dagger2-shaded

Wrapper around Dagger 2 with the Maven Shade Plugin so we can have Dagger 1 and Dagger 2 living together

Apache License 2.0Apache-2.0

Release

Dagger 2 Shaded 🕶

  1. 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'
}
  1. Play with Dagger 1 and Dagger 2 at the same time:
class MyClass @Inject @Inject2 constructor() {
  ...
}
  1. ???

  2. 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

Updating and building

  • 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!