[go: nahoru, domu]

blob: 489cd84a033cc69dffafd17630355f621fea4799 [file] [log] [blame]
Chris Craikfbfc7212021-01-27 11:54:18 -08001/*
2 * Copyright (C) 2020 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
Tiem Songee0da742024-01-03 14:08:46 -080017/**
18 * This file was created using the `create_project.py` script located in the
19 * `<AndroidX root>/development/project-creator` directory.
20 *
21 * Please use that script when creating a new project, rather than copying an existing project and
22 * modifying its settings.
23 */
Omar Ismail86e66062024-05-03 16:10:50 +010024import androidx.build.LibraryType
Rahul Ravikumar6da9b7f272021-10-20 13:52:42 -070025import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Chris Craikfbfc7212021-01-27 11:54:18 -080026
27plugins {
28 id("AndroidXPlugin")
29 id("com.android.library")
30 id("kotlin-android")
31}
32
33android {
34 defaultConfig {
Rahul Ravikumara1d7e3f2021-10-18 13:49:40 -070035 minSdkVersion 23
Chris Craikfbfc7212021-01-27 11:54:18 -080036 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070037 namespace "androidx.benchmark.macro.junit4"
Chris Craikfbfc7212021-01-27 11:54:18 -080038}
39
40dependencies {
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070041 api(libs.junit)
42 api(libs.kotlinStdlib)
Chris Craikfbfc7212021-01-27 11:54:18 -080043 api("androidx.annotation:annotation:1.1.0")
44 api(project(":benchmark:benchmark-macro"))
Aurimas Liutikas11a97d82024-02-12 11:38:28 -080045 api("androidx.test.uiautomator:uiautomator:2.3.0-rc01")
Chris Craikfbfc7212021-01-27 11:54:18 -080046 implementation(project(":benchmark:benchmark-common"))
Chris Craik4a801eb2023-03-27 12:28:16 -070047 implementation("androidx.test:rules:1.5.0")
Rahul Ravikumar8c943b82023-09-12 14:42:57 -070048 implementation("androidx.test:runner:1.5.2")
Chris Craikfbfc7212021-01-27 11:54:18 -080049
50 androidTestImplementation(project(":internal-testutils-ktx"))
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070051 androidTestImplementation(libs.testExtJunit)
52 androidTestImplementation(libs.testCore)
53 androidTestImplementation(libs.testRunner)
54 androidTestImplementation(libs.espressoCore)
55 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080056 // DexMaker has it"s own MockMaker
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070057 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080058 // DexMaker has it"s own MockMaker
59}
60
Chris Craik5d5db952024-04-11 15:04:05 -070061tasks.withType(KotlinCompile).configureEach {
62 kotlinOptions {
63 // Enable using experimental APIs from within same version group
64 freeCompilerArgs += [
65 "-opt-in=androidx.benchmark.macro.ExperimentalMetricApi",
66 "-opt-in=androidx.benchmark.perfetto.ExperimentalPerfettoTraceProcessorApi",
67 "-opt-in=androidx.benchmark.perfetto.ExperimentalPerfettoCaptureApi"
68 ]
69 }
70}
71
Chris Craikfbfc7212021-01-27 11:54:18 -080072androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -040073 name = "Benchmark - Macrobenchmark JUnit4"
Omar Ismail86e66062024-05-03 16:10:50 +010074 type = LibraryType.PUBLISHED_LIBRARY
Chris Craikfbfc7212021-01-27 11:54:18 -080075 inceptionYear = "2020"
76 description = "Android Benchmark - Macrobenchmark JUnit4"
Jinseong Jeon999075e2023-08-22 00:40:11 -070077 metalavaK2UastEnabled = true
Aurimas Liutikas5c5419a2024-05-29 15:26:58 -070078 legacyDisableKotlinStrictApiMode = true
Chris Craikfbfc7212021-01-27 11:54:18 -080079}