current build.gradle.kts: < /p>
android {
// ...
variantFilter {
ignore = run {
val isSim = flavors[0].name == "sim"
val isNet = !isSim
val isU = flavors[1].name == "custom"
val isMain = !isU
val buildType = buildType.name
val isDebug = buildType == "debug"
val isRelease = buildType == "release"
(isSim && isRelease) ||
(isSim && isU)
}
}
}
< /code>
Как создать аналогичную конфигурацию в новой версии плагина? < /p>
android {
androidComponents.beforeVariants {
it.enabled = run {
val isSim = it.productFlavors[0].second == "sim"
val isNet = !isSim
val isU = it.productFlavors[1].second == "custom"
val isMain = !isU
val isDebug = it.buildType == "debug"
val isRelease = it.buildType == "release"
!((isSim && isRelease) || (isSim && isU))
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/673 ... ow-to-rest
Мобильная версия