blob: 77d6df4267ffe955c5ee33e1787a2f18bdea3a19 [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
Chris Craikfbfc7212021-01-27 11:54:18 -080017import androidx.build.LibraryGroups
18import androidx.build.Publish
Rahul Ravikumar6da9b7f272021-10-20 13:52:42 -070019import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Chris Craikfbfc7212021-01-27 11:54:18 -080020
21plugins {
22 id("AndroidXPlugin")
23 id("com.android.library")
24 id("kotlin-android")
25}
26
27android {
28 defaultConfig {
Rahul Ravikumara1d7e3f2021-10-18 13:49:40 -070029 minSdkVersion 23
Chris Craikfbfc7212021-01-27 11:54:18 -080030 multiDexEnabled true
31 }
32}
33
34dependencies {
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070035 api(libs.junit)
36 api(libs.kotlinStdlib)
Chris Craikfbfc7212021-01-27 11:54:18 -080037 api("androidx.annotation:annotation:1.1.0")
Rahul Ravikumar5f42f072021-10-13 17:48:56 -070038 api("androidx.core:core:1.6.0")
Chris Craikfbfc7212021-01-27 11:54:18 -080039 api(project(":benchmark:benchmark-macro"))
40 implementation(project(":benchmark:benchmark-common"))
Chris Craikca61f762021-02-24 15:30:48 -080041 implementation("androidx.test:rules:1.3.0")
42 implementation("androidx.test:runner:1.3.0")
43 implementation("androidx.test.uiautomator:uiautomator:2.2.0")
Chris Craikfbfc7212021-01-27 11:54:18 -080044
45 androidTestImplementation(project(":internal-testutils-ktx"))
46 androidTestImplementation(project(":tracing:tracing-ktx"))
47 androidTestImplementation("androidx.test:rules:1.3.0")
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070048 androidTestImplementation(libs.testExtJunit)
49 androidTestImplementation(libs.testCore)
50 androidTestImplementation(libs.testRunner)
51 androidTestImplementation(libs.espressoCore)
52 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080053 // DexMaker has it"s own MockMaker
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070054 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080055 // DexMaker has it"s own MockMaker
56}
57
58androidx {
59 name = "Android Benchmark - Macrobenchmark JUnit4"
Chris Craik7a104212021-03-30 16:18:52 -070060 publish = Publish.SNAPSHOT_AND_RELEASE
Chris Craikfbfc7212021-01-27 11:54:18 -080061 mavenGroup = LibraryGroups.BENCHMARK
62 inceptionYear = "2020"
63 description = "Android Benchmark - Macrobenchmark JUnit4"
64}
Rahul Ravikumar6da9b7f272021-10-20 13:52:42 -070065
66// Allow usage of Kotlin's @OptIn.
67tasks.withType(KotlinCompile).configureEach {
68 kotlinOptions {
69 freeCompilerArgs += [ '-Xopt-in=kotlin.RequiresOptIn' ]
70 }
71}