| /* |
| * Copyright (C) 2020 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| import androidx.build.LibraryGroups |
| import androidx.build.Publish |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("com.android.library") |
| id("kotlin-android") |
| } |
| |
| android { |
| defaultConfig { |
| minSdkVersion 18 |
| multiDexEnabled true |
| // testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' |
| // Listener List |
| testInstrumentationRunnerArgument "listener", |
| "android.device.collectors.CpuUsageListener," + |
| "android.device.collectors.ProcLoadListener," + |
| "android.device.collectors.PerfettoListener," + |
| "android.device.collectors.AppStartupListener," + |
| "android.device.collectors.JankListener," + |
| "android.device.collectors.CrashListener," + |
| "android.device.collectors.ScreenshotOnFailureCollector," + |
| "android.device.collectors.LogcatOnFailureCollector," + |
| "android.device.collectors.IncidentReportListener," + |
| "android.device.collectors.TotalPssMetricListener" |
| |
| // ProcLoadListener |
| testInstrumentationRunnerArgument "procload-collector:proc-loadavg-interval", "2000" |
| testInstrumentationRunnerArgument "procload-collector:proc-loadavg-threshold", "0.5" |
| testInstrumentationRunnerArgument "procload-collector:proc-loadavg-timeout", "90000" |
| |
| // CpuUsageListener |
| testInstrumentationRunnerArgument "cpuusage-collector:disable_per_freq", "true" |
| testInstrumentationRunnerArgument "cpuusage-collector:disable_per_pkg", "true" |
| |
| // TotalPssMetricListener |
| testInstrumentationRunnerArgument "totalpss-collector:process-names", "androidx.compose.integration.demos" |
| |
| // JankListener (disable) |
| testInstrumentationRunnerArgument "jank-listener:log", "true" |
| |
| // Microbenchmark runner configuration |
| testInstrumentationRunnerArgument "iterations", "1" |
| } |
| } |
| |
| dependencies { |
| api(libs.junit) |
| api(libs.kotlinStdlib) |
| api("androidx.annotation:annotation:1.1.0") |
| // TODO: remove, once we remove the minor usages in CrystalBall |
| implementation(libs.guavaAndroid) |
| androidTestImplementation("com.android:collector-device-lib:0.1.0") |
| androidTestImplementation("com.android:collector-device-lib-platform:0.1.0") |
| androidTestImplementation("com.android:collector-helper-utilities:0.1.0") |
| androidTestImplementation("com.android:jank-helper:0.1.0") |
| androidTestImplementation("com.android:memory-helper:0.1.0") |
| androidTestImplementation("com.android:perfetto-helper:0.1.0") |
| androidTestImplementation("com.android:platform-test-composers:0.1.0") |
| androidTestImplementation("com.android:power-helper:0.1.0") |
| androidTestImplementation("com.android:simpleperf-helper:0.1.0") |
| androidTestImplementation("com.android:statsd-helper:0.1.0") |
| androidTestImplementation("com.android:system-metric-helper:0.1.0") |
| androidTestImplementation("com.android:test-composers:0.1.0") |
| androidTestImplementation("com.android:platform-test-rules:0.1.0") |
| androidTestImplementation("com.android:microbenchmark-device-lib:0.1.0") |
| androidTestImplementation("androidx.test:rules:1.3.0") |
| androidTestImplementation("androidx.test:runner:1.3.0") |
| implementation(libs.testExtJunit) |
| implementation(libs.testUiautomator) |
| } |
| |
| androidx { |
| name = "Android Benchmark - Crystalball experiment" |
| publish = Publish.NONE |
| mavenGroup = LibraryGroups.BENCHMARK |
| inceptionYear = "2020" |
| description = "Android Benchmark - Crystalball experiment" |
| } |