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 | |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 17 | import androidx.build.Publish |
Rahul Ravikumar | 6da9b7f27 | 2021-10-20 13:52:42 -0700 | [diff] [blame] | 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 19 | |
| 20 | plugins { |
| 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
| 23 | id("kotlin-android") |
| 24 | } |
| 25 | |
| 26 | android { |
| 27 | defaultConfig { |
Rahul Ravikumar | a1d7e3f | 2021-10-18 13:49:40 -0700 | [diff] [blame] | 28 | minSdkVersion 23 |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 29 | multiDexEnabled true |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | dependencies { |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 34 | api(libs.junit) |
| 35 | api(libs.kotlinStdlib) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 36 | api("androidx.annotation:annotation:1.1.0") |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 37 | api(project(":benchmark:benchmark-macro")) |
| 38 | implementation(project(":benchmark:benchmark-common")) |
Chris Craik | ca61f76 | 2021-02-24 15:30:48 -0800 | [diff] [blame] | 39 | implementation("androidx.test:rules:1.3.0") |
| 40 | implementation("androidx.test:runner:1.3.0") |
| 41 | implementation("androidx.test.uiautomator:uiautomator:2.2.0") |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 42 | |
| 43 | androidTestImplementation(project(":internal-testutils-ktx")) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 44 | androidTestImplementation("androidx.test:rules:1.3.0") |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 45 | androidTestImplementation(libs.testExtJunit) |
| 46 | androidTestImplementation(libs.testCore) |
| 47 | androidTestImplementation(libs.testRunner) |
| 48 | androidTestImplementation(libs.espressoCore) |
| 49 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 50 | // DexMaker has it"s own MockMaker |
Aurimas Liutikas | 2c1a81e | 2021-05-24 16:43:05 -0700 | [diff] [blame] | 51 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 52 | // DexMaker has it"s own MockMaker |
| 53 | } |
| 54 | |
| 55 | androidx { |
| 56 | name = "Android Benchmark - Macrobenchmark JUnit4" |
Chris Craik | 7a10421 | 2021-03-30 16:18:52 -0700 | [diff] [blame] | 57 | publish = Publish.SNAPSHOT_AND_RELEASE |
Chris Craik | fbfc721 | 2021-01-27 11:54:18 -0800 | [diff] [blame] | 58 | mavenGroup = LibraryGroups.BENCHMARK |
| 59 | inceptionYear = "2020" |
| 60 | description = "Android Benchmark - Macrobenchmark JUnit4" |
| 61 | } |
Rahul Ravikumar | 6da9b7f27 | 2021-10-20 13:52:42 -0700 | [diff] [blame] | 62 | |
| 63 | // Allow usage of Kotlin's @OptIn. |
| 64 | tasks.withType(KotlinCompile).configureEach { |
| 65 | kotlinOptions { |
| 66 | freeCompilerArgs += [ '-Xopt-in=kotlin.RequiresOptIn' ] |
| 67 | } |
| 68 | } |