Suppose I have an Android app with three build types:
buildTypes {
release {
....
}
optRelease {
....
}
debug {
....
}
}
And I have a dependent module:
dependencies {
implementation project(':myDependency')
}
Suppose this dependency only has two build types (let's say debug
and release
), and I want full control over which of my app's build types uses which of the dependency's build types. For example, I'd like my app's optRelease
to use the library's release
, and the app's release
the use the library's debug
.
That used to be possible before Android Studio 3.0, but the new build variant system doesn't seem to allow for that anymore.
How can I explicitly state which build type to use? Let's say that I have no control over the dependency and cannot modify its gradle configuration.