Slackbot
08/25/2022, 9:44 AMXavier Ducrohet
08/26/2022, 3:46 PMVinay Potluri
09/03/2022, 5:07 AMvar androidExtension = project.extensions.getByName("android") as AppExtension
var appVariants = androidExtension.applicationVariants
appVariants.configureEach{ variant ->
variant.testVariant.connectedInstrumentTestProvider.configure {
instrumentationTestTask ->
// configure the task here
}
}
Considering the fact that the old variants API is deprecated in favor of the new how can i access the connectedInstrumentTestProvider
This is how I use the new API but cannot configure connectedInstrumentTestProvider
var androidComponentExtension = project.extensions.getByType(AndroidComponentsExtension::class.java)
var appVariants = androidExtension.applicationVariants
componentExtension.onVariants { variant ->
// connectedInstrumentTestProvider is unavailable to configure onVariants / beforeVaraints
}
Xavier Ducrohet
09/07/2022, 3:44 PM