android / testing-samples

A collection of samples demonstrating different frameworks and techniques for automated testing
Apache License 2.0
9.21k stars 3.62k forks source link

testInstrumentationRunnerArguments clearPackageData in kotlin dsl and recent gradle #482

Closed Gelassen closed 1 year ago

Gelassen commented 1 year ago

Could you please update your official doc or clarify here how to define testInstrumentationRunnerArguments clearPackageData: 'true' in kotlin dsl and with recent gradle verision?

Kotlin dsl has minor difference in syntax I haven't figure out how this row of code should be done on it. Also there is a claim this become deprecate since gradle 7.0.3 and property should be used instead.

Gelassen commented 1 year ago
testInstrumentationRunnerArguments["clearPackageData"] = "true"

Ref. https://developer.android.com/topic/performance/benchmarking/macrobenchmark-instrumentation-args