After updating to Gradle plugin 3.0.0 beta 4 our build failed with the following message:
buildTypeMatching has been removed. Use buildTypes.<name>.fallbacks
Our libraries have release
and debug
buildType
s, but our app has two additional buildType
s: 'releaseWithLogs' and 'debugMinified'.
Snippet of our app Gradle file:
android {
// ...
buildTypeMatching 'releaseWithLogs', 'release'
buildTypeMatching 'debugMinified', 'debug'
buildTypes {
debug {
// ...
}
debugMinified {
// ...
}
release {
// ...
}
releaseWithLogs {
// ...
}
}
}
After some investigation, the following announcement has been found: Android Studio 3.0 Beta 4 is now available. There, it mentions:
So, our previous app build.gradle gets converted to:
Notice that, instead of saying that
buildType
releaseWithLogs
will also match withrelease
(buildTypeMatching 'releaseWithLogs', 'release'
), we specify the match inside thebuildType
itself. Same fordebugMinified
matchingdebug
. Also notice that there's no need to include this inrelease
anddebug
buildType
s, as they already match.