leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 1 | /* |
| 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 Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 17 | |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 18 | import androidx.build.LibraryType |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 19 | |
| 20 | plugins { |
| 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
AL Ho | e8c7930 | 2020-11-03 15:35:11 +0800 | [diff] [blame] | 23 | id("kotlin-android") |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | dependencies { |
leo huang | 39b7314 | 2021-05-18 15:14:24 +0800 | [diff] [blame] | 27 | api("androidx.annotation:annotation:1.2.0") |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 28 | api(project(":camera:camera-core")) |
AL Ho | e8c7930 | 2020-11-03 15:35:11 +0800 | [diff] [blame] | 29 | implementation("androidx.core:core:1.1.0") |
| 30 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 31 | implementation(libs.autoValueAnnotations) |
AL Ho | e8c7930 | 2020-11-03 15:35:11 +0800 | [diff] [blame] | 32 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 33 | annotationProcessor(libs.autoValue) |
AL Ho | e8c7930 | 2020-11-03 15:35:11 +0800 | [diff] [blame] | 34 | |
Aurimas Liutikas | 13ff572 | 2023-04-18 19:34:40 +0000 | [diff] [blame] | 35 | // TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if |
| 36 | // it is ever upgraded. |
Aurimas Liutikas | b20296a | 2021-12-21 15:56:47 -0800 | [diff] [blame] | 37 | testImplementation(libs.junit) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 38 | testImplementation(libs.kotlinStdlib) |
| 39 | testImplementation(libs.testCore) |
| 40 | testImplementation(libs.testRunner) |
| 41 | testImplementation(libs.junit) |
| 42 | testImplementation(libs.truth) |
| 43 | testImplementation(libs.robolectric) |
Aurimas Liutikas | 759f968 | 2022-10-05 07:01:37 -0700 | [diff] [blame] | 44 | testImplementation(libs.mockitoCore4) |
Trevor McGuire | 1c6d8be | 2021-11-12 21:22:42 -0800 | [diff] [blame] | 45 | testImplementation("androidx.core:core-ktx:1.1.0") |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 46 | testImplementation(project(":camera:camera-testing"), { |
AL Ho | e8c7930 | 2020-11-03 15:35:11 +0800 | [diff] [blame] | 47 | exclude group: "androidx.camera", module: "camera-core" |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 48 | }) |
leo huang | 2059c47 | 2020-10-22 22:31:50 +0800 | [diff] [blame] | 49 | |
Aurimas Liutikas | 13ff572 | 2023-04-18 19:34:40 +0000 | [diff] [blame] | 50 | androidTestImplementation(project(path: ":camera:camera-camera2")) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 51 | androidTestImplementation(libs.testExtJunit) |
| 52 | androidTestImplementation(libs.testCore) |
| 53 | androidTestImplementation(libs.testRunner) |
| 54 | androidTestImplementation(libs.testRules) |
| 55 | androidTestImplementation(libs.truth) |
Charcoal Chen | 704df96 | 2022-09-30 08:44:46 +0000 | [diff] [blame] | 56 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 57 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker |
leo huang | d6a57ca | 2022-05-13 09:04:33 +0800 | [diff] [blame] | 58 | androidTestImplementation(libs.autoValueAnnotations) |
Wegin Lee | cb60086a | 2021-07-23 17:26:16 +0800 | [diff] [blame] | 59 | androidTestImplementation(project(":camera:camera-lifecycle")) |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 60 | androidTestImplementation(project(":camera:camera-testing")) { |
| 61 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 62 | exclude(group:"androidx.test") |
| 63 | } |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 64 | androidTestImplementation(libs.kotlinStdlib) |
| 65 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
Trevor McGuire | 017bf2e | 2024-05-04 00:22:56 +0000 | [diff] [blame] | 66 | androidTestImplementation(libs.atomicFu) |
leo huang | 2059c47 | 2020-10-22 22:31:50 +0800 | [diff] [blame] | 67 | androidTestImplementation(project(":concurrent:concurrent-futures-ktx")) |
| 68 | androidTestImplementation(project(":internal-testutils-truth")) |
David Jia | 5c32aea | 2022-07-26 00:30:22 +0000 | [diff] [blame] | 69 | androidTestImplementation(project(":camera:camera-camera2-pipe-integration")) |
Charcoal Chen | 704df96 | 2022-09-30 08:44:46 +0000 | [diff] [blame] | 70 | androidTestImplementation libs.mockitoKotlin, { |
| 71 | exclude group: 'org.mockito' // to keep control on the mockito version |
| 72 | } |
leo huang | d6a57ca | 2022-05-13 09:04:33 +0800 | [diff] [blame] | 73 | androidTestAnnotationProcessor(libs.autoValue) |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | android { |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 77 | lintOptions { |
| 78 | enable 'CameraXQuirksClassDetector' |
| 79 | } |
| 80 | |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 81 | // Use Robolectric 4.+ |
| 82 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 83 | namespace "androidx.camera.video" |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 87 | name = "Camera Video" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 88 | type = LibraryType.PUBLISHED_LIBRARY |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 89 | 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 Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 93 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 94 | legacyDisableKotlinStrictApiMode = true |
leo huang | e9b9585 | 2020-06-03 17:08:55 +0800 | [diff] [blame] | 95 | } |