blob: 4834db1f7393adfa327cf178aefc46a640e0ab90 [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
TY Chang84e89612021-07-09 15:10:26 +080021import androidx.build.RunApiTasks
leo huange9b95852020-06-03 17:08:55 +080022
23plugins {
24 id("AndroidXPlugin")
25 id("com.android.library")
AL Hoe8c79302020-11-03 15:35:11 +080026 id("kotlin-android")
leo huange9b95852020-06-03 17:08:55 +080027}
28
29dependencies {
leo huang39b73142021-05-18 15:14:24 +080030 api("androidx.annotation:annotation:1.2.0")
leo huange9b95852020-06-03 17:08:55 +080031 api(project(":camera:camera-core"))
AL Hoe8c79302020-11-03 15:35:11 +080032 implementation("androidx.core:core:1.1.0")
33 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070034 implementation(libs.autoValueAnnotations)
AL Hoe8c79302020-11-03 15:35:11 +080035
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070036 annotationProcessor(libs.autoValue)
AL Hoe8c79302020-11-03 15:35:11 +080037
leo huang433b9dc2021-03-01 14:07:16 +080038 // TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if
39 // it is ever upgraded.
40 testImplementation("junit:junit:4.13")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070041 testImplementation(libs.kotlinStdlib)
42 testImplementation(libs.testCore)
43 testImplementation(libs.testRunner)
44 testImplementation(libs.junit)
45 testImplementation(libs.truth)
46 testImplementation(libs.robolectric)
47 testImplementation(libs.mockitoCore)
Jim Sproch9e38b4f2021-01-06 14:21:06 -080048 testImplementation(project(":camera:camera-testing"), {
AL Hoe8c79302020-11-03 15:35:11 +080049 exclude group: "androidx.camera", module: "camera-core"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080050 })
leo huang2059c472020-10-22 22:31:50 +080051
Jim Sproch9e38b4f2021-01-06 14:21:06 -080052 androidTestImplementation(project(path: ":camera:camera-camera2"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070053 androidTestImplementation(libs.testExtJunit)
54 androidTestImplementation(libs.testCore)
55 androidTestImplementation(libs.testRunner)
56 androidTestImplementation(libs.testRules)
57 androidTestImplementation(libs.truth)
58 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
59 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
Wegin Leecb60086a2021-07-23 17:26:16 +080060 androidTestImplementation(project(":camera:camera-lifecycle"))
leo huang2059c472020-10-22 22:31:50 +080061 androidTestImplementation(project(":camera:camera-testing"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070062 androidTestImplementation(libs.kotlinStdlib)
63 androidTestImplementation(libs.kotlinCoroutinesAndroid)
leo huang2059c472020-10-22 22:31:50 +080064 androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
65 androidTestImplementation(project(":internal-testutils-truth"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070066 androidTestImplementation libs.mockitoKotlin, {
AL Ho22531302021-01-19 10:22:41 +080067 exclude group: 'org.mockito' // to keep control on the mockito version
68 }
leo huange9b95852020-06-03 17:08:55 +080069}
70
71android {
72 defaultConfig {
73 minSdkVersion 21
74 }
75
76 // Use Robolectric 4.+
77 testOptions.unitTests.includeAndroidResources = true
Steven Schäferb7520772021-05-25 17:48:51 +020078
79 kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
leo huange9b95852020-06-03 17:08:55 +080080}
81
82androidx {
83 name = "Jetpack Camera Video Library"
84 publish = Publish.NONE
TY Chang84e89612021-07-09 15:10:26 +080085 runApiTasks = new RunApiTasks.Yes("Need to track API surface before moving to publish")
leo huange9b95852020-06-03 17:08:55 +080086 mavenVersion = LibraryVersions.CAMERA_VIDEO
87 mavenGroup = LibraryGroups.CAMERA
88 inceptionYear = "2020"
89 description = "Video components for the Jetpack Camera Library, a library providing a " +
90 "consistent and reliable camera foundation that enables great camera driven " +
91 "experiences across all of Android."
92}