blob: 94a62dc2af863cf20173fdcf15cf2eab27e02190 [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.Publish
Rahul Ravikumar6da9b7f272021-10-20 13:52:42 -070018import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Chris Craikfbfc7212021-01-27 11:54:18 -080019
20plugins {
21 id("AndroidXPlugin")
22 id("com.android.library")
23 id("kotlin-android")
24}
25
26android {
27 defaultConfig {
Rahul Ravikumara1d7e3f2021-10-18 13:49:40 -070028 minSdkVersion 23
Chris Craikfbfc7212021-01-27 11:54:18 -080029 multiDexEnabled true
30 }
31}
32
33dependencies {
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070034 api(libs.junit)
35 api(libs.kotlinStdlib)
Chris Craikfbfc7212021-01-27 11:54:18 -080036 api("androidx.annotation:annotation:1.1.0")
Chris Craikfbfc7212021-01-27 11:54:18 -080037 api(project(":benchmark:benchmark-macro"))
38 implementation(project(":benchmark:benchmark-common"))
Chris Craikca61f762021-02-24 15:30:48 -080039 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 Craikfbfc7212021-01-27 11:54:18 -080042
43 androidTestImplementation(project(":internal-testutils-ktx"))
Chris Craikfbfc7212021-01-27 11:54:18 -080044 androidTestImplementation("androidx.test:rules:1.3.0")
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070045 androidTestImplementation(libs.testExtJunit)
46 androidTestImplementation(libs.testCore)
47 androidTestImplementation(libs.testRunner)
48 androidTestImplementation(libs.espressoCore)
49 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080050 // DexMaker has it"s own MockMaker
Aurimas Liutikas2c1a81e2021-05-24 16:43:05 -070051 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
Chris Craikfbfc7212021-01-27 11:54:18 -080052 // DexMaker has it"s own MockMaker
53}
54
55androidx {
56 name = "Android Benchmark - Macrobenchmark JUnit4"
Chris Craik7a104212021-03-30 16:18:52 -070057 publish = Publish.SNAPSHOT_AND_RELEASE
Chris Craikfbfc7212021-01-27 11:54:18 -080058 mavenGroup = LibraryGroups.BENCHMARK
59 inceptionYear = "2020"
60 description = "Android Benchmark - Macrobenchmark JUnit4"
61}
Rahul Ravikumar6da9b7f272021-10-20 13:52:42 -070062
63// Allow usage of Kotlin's @OptIn.
64tasks.withType(KotlinCompile).configureEach {
65 kotlinOptions {
66 freeCompilerArgs += [ '-Xopt-in=kotlin.RequiresOptIn' ]
67 }
68}