Xavier Ducrohet
05/26/2022, 2:30 AMandroidComponents {
beforeVariant(selector().withBuildType("dev")) { variant ->
variant.minSdk = 21
}
}
See https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/AndroidComponentsExtension#beforeVariant[…]lin.Function1) for more infoJavi
05/26/2022, 9:31 AMminSdk
is not a Property<Int>
, is there any reason? I though that with the refactor it would become Property<Int>
but I was surprised when it was still Int
Xavier Ducrohet
05/26/2022, 6:41 PMminSdk
values can impact the task graph and therefore must be read at configuration time. Because of this it cannot be dynamic using Property
. This is also why it's read/write in beforeVariant
and read-only in onVariant
(because once you get to onVariant
we need the task graph to be finalized)