From cbaf32d4c44e98aa2523dcdfcfcde0fa38ca6cf6 Mon Sep 17 00:00:00 2001 From: Ben Weiss Date: Tue, 4 Oct 2022 11:25:54 +0100 Subject: [PATCH] Add gradle managed device to benchmarking Change-Id: I1092d5134ebb003e979b62ee5697ec6e259d3523 --- benchmark/build.gradle.kts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/benchmark/build.gradle.kts b/benchmark/build.gradle.kts index 1c6dbf94c..931fd6d00 100644 --- a/benchmark/build.gradle.kts +++ b/benchmark/build.gradle.kts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import com.android.build.api.dsl.ManagedVirtualDevice import com.google.samples.apps.nowinandroid.configureFlavors plugins { @@ -47,9 +48,21 @@ android { // which is more close to what will be shipped to users (no fake data), but has ability to run the // benchmarks on demo, so we benchmark on stable data. configureFlavors(this) - + targetProjectPath = ":app" experimentalProperties["android.experimental.self-instrumenting"] = true + + testOptions { + managedDevices { + devices { + create("pixel5Api30") { + device = "Pixel 5" + apiLevel = 30 + systemImageSource = "aosp" + } + } + } + } } dependencies {