testInstrumentationRunnerArguments is deprecated and replaced by property

459 Views Asked by At

Earlier to ensure that the app's state is completely cleared between tests we used in gradle the command:

testInstrumentationRunnerArguments clearPackageData: 'true'

In gradle 7.0.3 and higher this command has been already deprecated doesn't work:

@Incubating
@Deprecated(message = "Replaced by testInstrumentationRunnerArguments property")
public abstract fun testInstrumentationRunnerArguments(
    args: Map<String, String>
): Unit
Deprecated:
Replaced by testInstrumentationRunnerArguments property
  Gradle: com.android.tools.build:gradle-api:7.0.3 (gradle-api-7.0.3-sources.jar)

How to clear the state between instrumented tests in gradle now?

0

There are 0 best solutions below