This project demonstrates two different approaches to dependency injection using Metro.
metrosample/
├── memberinjection/ # Member Injection PoC
│ ├── app/ # Application module
│ ├── core-di/ # Core DI infrastructure
│ └── feature/ # Feature module
│
└── fullconstructorinjection/ # Constructor Injection PoC
├── app/ # Application module
├── core-di/ # Core DI infrastructure
└── feature/ # Feature module
- Package:
memberinjection/* - Demonstrates member injection pattern with
@Inject lateinit var - Fragment uses member injection to receive dependencies
- Allows ActivityScoped dependencies
- Package:
fullconstructorinjection/* - Demonstrates constructor injection pattern
- Allows ActivityScoped dependencies
Both apps can be installed simultaneously on the same device due to different application IDs.
./gradlew :memberinjection:app:installDebug./gradlew :fullconstructorinjection:app:installDebug