Suppose I have an Android app with three build types:
buildTypes {
release {
....
}
optRelease {
....
}
debug {
....
Starting from gradle 3.0.0 you can use following for default project variants (release, debug, test etc)
Simple example would be:
android {
....
}
dependencies {
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
androidTestImplementation jUnit
testImplementation mockito
}
If you have multiple flavors of your app, starting from 3.0 you have to declare flavor dimensions first, define fallback and matching strategy in your default config (for remote dependencies, and dependencies without dimensions) and gradle will recognize what dependencies should be included for that flavor. For more info check this migration guide.