[go: nahoru, domu]

blob: 22fafd669a68f8a2961995713322b3d96b3247ec [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
Omar Ismail86e66062024-05-03 16:10:50 +010018import androidx.build.LibraryType
leo huange9b95852020-06-03 17:08:55 +080019
20plugins {
21 id("AndroidXPlugin")
22 id("com.android.library")
AL Hoe8c79302020-11-03 15:35:11 +080023 id("kotlin-android")
leo huange9b95852020-06-03 17:08:55 +080024}
25
26dependencies {
leo huang39b73142021-05-18 15:14:24 +080027 api("androidx.annotation:annotation:1.2.0")
leo huange9b95852020-06-03 17:08:55 +080028 api(project(":camera:camera-core"))
AL Hoe8c79302020-11-03 15:35:11 +080029 implementation("androidx.core:core:1.1.0")
30 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070031 implementation(libs.autoValueAnnotations)
AL Hoe8c79302020-11-03 15:35:11 +080032
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070033 annotationProcessor(libs.autoValue)
AL Hoe8c79302020-11-03 15:35:11 +080034
Aurimas Liutikas13ff5722023-04-18 19:34:40 +000035 // TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if
36 // it is ever upgraded.
Aurimas Liutikasb20296a2021-12-21 15:56:47 -080037 testImplementation(libs.junit)
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070038 testImplementation(libs.kotlinStdlib)
39 testImplementation(libs.testCore)
40 testImplementation(libs.testRunner)
41 testImplementation(libs.junit)
42 testImplementation(libs.truth)
43 testImplementation(libs.robolectric)
Aurimas Liutikas759f9682022-10-05 07:01:37 -070044 testImplementation(libs.mockitoCore4)
Trevor McGuire1c6d8be2021-11-12 21:22:42 -080045 testImplementation("androidx.core:core-ktx:1.1.0")
Jim Sproch9e38b4f2021-01-06 14:21:06 -080046 testImplementation(project(":camera:camera-testing"), {
AL Hoe8c79302020-11-03 15:35:11 +080047 exclude group: "androidx.camera", module: "camera-core"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080048 })
leo huang2059c472020-10-22 22:31:50 +080049
Aurimas Liutikas13ff5722023-04-18 19:34:40 +000050 androidTestImplementation(project(path: ":camera:camera-camera2"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070051 androidTestImplementation(libs.testExtJunit)
52 androidTestImplementation(libs.testCore)
53 androidTestImplementation(libs.testRunner)
54 androidTestImplementation(libs.testRules)
55 androidTestImplementation(libs.truth)
Charcoal Chen704df962022-09-30 08:44:46 +000056 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070057 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
leo huangd6a57ca2022-05-13 09:04:33 +080058 androidTestImplementation(libs.autoValueAnnotations)
Wegin Leecb60086a2021-07-23 17:26:16 +080059 androidTestImplementation(project(":camera:camera-lifecycle"))
Tahsin Masrur068199ff2023-06-01 12:20:32 +080060 androidTestImplementation(project(":camera:camera-testing")) {
61 // Ensure camera-testing does not pull in androidx.test dependencies
62 exclude(group:"androidx.test")
63 }
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070064 androidTestImplementation(libs.kotlinStdlib)
65 androidTestImplementation(libs.kotlinCoroutinesAndroid)
Trevor McGuire017bf2e2024-05-04 00:22:56 +000066 androidTestImplementation(libs.atomicFu)
leo huang2059c472020-10-22 22:31:50 +080067 androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
68 androidTestImplementation(project(":internal-testutils-truth"))
David Jia5c32aea2022-07-26 00:30:22 +000069 androidTestImplementation(project(":camera:camera-camera2-pipe-integration"))
Charcoal Chen704df962022-09-30 08:44:46 +000070 androidTestImplementation libs.mockitoKotlin, {
71 exclude group: 'org.mockito' // to keep control on the mockito version
72 }
leo huangd6a57ca2022-05-13 09:04:33 +080073 androidTestAnnotationProcessor(libs.autoValue)
leo huange9b95852020-06-03 17:08:55 +080074}
75
76android {
System Administratorc4ab0a12022-04-13 12:05:20 -070077 lintOptions {
78 enable 'CameraXQuirksClassDetector'
79 }
80
leo huange9b95852020-06-03 17:08:55 +080081 // Use Robolectric 4.+
82 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070083 namespace "androidx.camera.video"
leo huange9b95852020-06-03 17:08:55 +080084}
85
86androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -040087 name = "Camera Video"
Omar Ismail86e66062024-05-03 16:10:50 +010088 type = LibraryType.PUBLISHED_LIBRARY
leo huange9b95852020-06-03 17:08:55 +080089 inceptionYear = "2020"
90 description = "Video components for the Jetpack Camera Library, a library providing a " +
91 "consistent and reliable camera foundation that enables great camera driven " +
92 "experiences across all of Android."
Jinseong Jeon999075e2023-08-22 00:40:11 -070093 metalavaK2UastEnabled = true
Aurimas Liutikas5c5419a2024-05-29 15:26:58 -070094 legacyDisableKotlinStrictApiMode = true
leo huange9b95852020-06-03 17:08:55 +080095}