Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 1 | /* |
| 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 Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 17 | /** |
| 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 Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 24 | import androidx.build.LibraryType |
Rahul Ravikumar | 6da9b7f27 | 2021-10-20 13:52:42 -0700 | [diff] [blame] | 25 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 26 | |
| 27 | plugins { |
| 28 | id("AndroidXPlugin") |
| 29 | id("com.android.library") |
| 30 | id("kotlin-android") |
| 31 | } |
| 32 | |
| 33 | android { |
| 34 | defaultConfig { |
Rahul Ravikumar | a1d7e3f | 2021-10-18 13:49:40 -0700 | [diff] [blame] | 35 | minSdkVersion 23 |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 36 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 37 | namespace "androidx.benchmark.macro.junit4" |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | dependencies { |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 41 | api(libs.junit) |
| 42 | api(libs.kotlinStdlib) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 43 | api("androidx.annotation:annotation:1.1.0") |
| 44 | api(project(":benchmark:benchmark-macro")) |
Aurimas Liutikas | 11a97d8 | 2024-02-12 11:38:28 -0800 | [diff] [blame] | 45 | api("androidx.test.uiautomator:uiautomator:2.3.0-rc01") |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 46 | implementation(project(":benchmark:benchmark-common")) |
Chris Craik | 4a801eb | 2023-03-27 12:28:16 -0700 | [diff] [blame] | 47 | implementation("androidx.test:rules:1.5.0") |
Rahul Ravikumar | 8c943b8 | 2023-09-12 14:42:57 -0700 | [diff] [blame] | 48 | implementation("androidx.test:runner:1.5.2") |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 49 | |
| 50 | androidTestImplementation(project(":internal-testutils-ktx")) |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 51 | androidTestImplementation(libs.testExtJunit) |
| 52 | androidTestImplementation(libs.testCore) |
| 53 | androidTestImplementation(libs.testRunner) |
| 54 | androidTestImplementation(libs.espressoCore) |
| 55 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 56 | // DexMaker has it"s own MockMaker |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 57 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 58 | // DexMaker has it"s own MockMaker |
| 59 | } |
| 60 | |
Chris Craik | 5d5db95 | 2024-04-11 15:04:05 -0700 | [diff] [blame] | 61 | tasks.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 Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 72 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 73 | name = "Benchmark - Macrobenchmark JUnit4" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 74 | type = LibraryType.PUBLISHED_LIBRARY |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 75 | inceptionYear = "2020" |
| 76 | description = "Android Benchmark - Macrobenchmark JUnit4" |
Jinseong Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 77 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 78 | legacyDisableKotlinStrictApiMode = true |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 79 | } |