blob: 60272a1d6d41d0cfa60330e8959c547122533cf7 [file] [log] [blame]
leo huange9b95852020-06-03 17:08:55 +08001/*
2 * Copyright 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
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070017
leo huange9b95852020-06-03 17:08:55 +080018import androidx.build.LibraryGroups
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070019import androidx.build.LibraryVersions
leo huange9b95852020-06-03 17:08:55 +080020import androidx.build.Publish
21
22plugins {
23 id("AndroidXPlugin")
24 id("com.android.library")
AL Hoe8c79302020-11-03 15:35:11 +080025 id("kotlin-android")
leo huange9b95852020-06-03 17:08:55 +080026}
27
28dependencies {
leo huang39b73142021-05-18 15:14:24 +080029 api("androidx.annotation:annotation:1.2.0")
leo huange9b95852020-06-03 17:08:55 +080030 api(project(":camera:camera-core"))
AL Hoe8c79302020-11-03 15:35:11 +080031 implementation("androidx.core:core:1.1.0")
32 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070033 implementation(libs.autoValueAnnotations)
AL Hoe8c79302020-11-03 15:35:11 +080034
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070035 annotationProcessor(libs.autoValue)
AL Hoe8c79302020-11-03 15:35:11 +080036
leo huang433b9dc2021-03-01 14:07:16 +080037 // TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if
38 // it is ever upgraded.
39 testImplementation("junit:junit:4.13")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070040 testImplementation(libs.kotlinStdlib)
41 testImplementation(libs.testCore)
42 testImplementation(libs.testRunner)
43 testImplementation(libs.junit)
44 testImplementation(libs.truth)
45 testImplementation(libs.robolectric)
46 testImplementation(libs.mockitoCore)
Jim Sproch9e38b4f2021-01-06 14:21:06 -080047 testImplementation(project(":camera:camera-testing"), {
AL Hoe8c79302020-11-03 15:35:11 +080048 exclude group: "androidx.camera", module: "camera-core"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080049 })
leo huang2059c472020-10-22 22:31:50 +080050
Jim Sproch9e38b4f2021-01-06 14:21:06 -080051 androidTestImplementation(project(path: ":camera:camera-camera2"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070052 androidTestImplementation(libs.testExtJunit)
53 androidTestImplementation(libs.testCore)
54 androidTestImplementation(libs.testRunner)
55 androidTestImplementation(libs.testRules)
56 androidTestImplementation(libs.truth)
57 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
58 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
leo huang2059c472020-10-22 22:31:50 +080059 androidTestImplementation(project(":camera:camera-testing"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070060 androidTestImplementation(libs.kotlinStdlib)
61 androidTestImplementation(libs.kotlinCoroutinesAndroid)
leo huang2059c472020-10-22 22:31:50 +080062 androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
63 androidTestImplementation(project(":internal-testutils-truth"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070064 androidTestImplementation libs.mockitoKotlin, {
AL Ho22531302021-01-19 10:22:41 +080065 exclude group: 'org.mockito' // to keep control on the mockito version
66 }
leo huange9b95852020-06-03 17:08:55 +080067}
68
69android {
70 defaultConfig {
71 minSdkVersion 21
72 }
73
74 // Use Robolectric 4.+
75 testOptions.unitTests.includeAndroidResources = true
Steven Schäferb7520772021-05-25 17:48:51 +020076
77 kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
leo huange9b95852020-06-03 17:08:55 +080078}
79
80androidx {
81 name = "Jetpack Camera Video Library"
82 publish = Publish.NONE
83 mavenVersion = LibraryVersions.CAMERA_VIDEO
84 mavenGroup = LibraryGroups.CAMERA
85 inceptionYear = "2020"
86 description = "Video components for the Jetpack Camera Library, a library providing a " +
87 "consistent and reliable camera foundation that enables great camera driven " +
88 "experiences across all of Android."
89}