1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17plugins {
18    id("AndroidXPlugin")
19    id("com.android.test")
20    id("org.jetbrains.kotlin.android")
21}
22
23android {
24    namespace = "androidx.tv.integration.macrobenchmark"
25
26    defaultConfig {
27        minSdk = 24
28    }
29
30    buildTypes {
31        // Create a release build type and make sure it's the only one enabled.
32        // This is needed because we benchmark the release build type only.
33        release {}
34    }
35
36    targetProjectPath = ":tv:integration-tests:macrobenchmark-target"
37    experimentalProperties["android.experimental.self-instrumenting"] = true
38}
39
40dependencies {
41    implementation("androidx.benchmark:benchmark-junit4:1.2.4")
42    implementation("androidx.benchmark:benchmark-macro-junit4:1.2.4")
43    implementation(project(":internal-testutils-macrobenchmark"))
44    implementation(libs.testRules)
45    implementation(libs.testExtJunit)
46    implementation(libs.testCore)
47    implementation(libs.testRunner)
48    implementation(libs.testUiautomator)
49}
50
51androidComponents {
52    beforeVariants(selector().all()) {
53        enable = buildType == "release"
54    }
55}