[go: nahoru, domu]

blob: 04ce49c1d482a2c1cbe0abd0d45d2c85affc784f [file] [log] [blame]
Trevor McGuire89ca96a2019-02-19 11:38:44 -08001/*
2 * Copyright 2019 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
Tiem Songee0da742024-01-03 14:08:46 -080017/**
18 * This file was created using the `create_project.py` script located in the
19 * `<AndroidX root>/development/project-creator` directory.
20 *
21 * Please use that script when creating a new project, rather than copying an existing project and
22 * modifying its settings.
23 */
Omar Ismail86e66062024-05-03 16:10:50 +010024import androidx.build.LibraryType
Trevor McGuire89ca96a2019-02-19 11:38:44 -080025
26plugins {
Wenhung Teng73b1dbd2019-04-08 09:11:18 -070027 id("AndroidXPlugin")
28 id("com.android.library")
charcoalchen005c60b2020-09-02 14:16:59 +080029 id("kotlin-android")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080030}
31
32dependencies {
33 api(project(":camera:camera-core"))
leo huang39b73142021-05-18 15:14:24 +080034 api("androidx.annotation:annotation:1.2.0")
TY Chang15ef1c22020-11-20 15:48:43 +080035 implementation("androidx.core:core:1.1.0")
Ian Lake0e0059152019-09-27 14:43:23 -070036 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070037 implementation(libs.guavaListenableFuture)
38 implementation(libs.autoValueAnnotations)
Trevor McGuire89ca96a2019-02-19 11:38:44 -080039
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070040 annotationProcessor(libs.autoValue)
Trevor McGuire89ca96a2019-02-19 11:38:44 -080041
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070042 testImplementation(libs.testCore)
43 testImplementation(libs.testRunner)
44 testImplementation(libs.junit)
45 testImplementation(libs.truth)
WenHung_Teng2fa5f702021-12-09 11:35:04 +080046 testImplementation(libs.robolectric)
Aurimas Liutikas759f9682022-10-05 07:01:37 -070047 testImplementation(libs.mockitoCore4)
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070048 testImplementation(libs.kotlinCoroutinesTest)
natnaelbelaya817dd92024-01-17 10:30:59 -050049 testImplementation("androidx.annotation:annotation-experimental:1.4.0")
WenHung_Tengd43a6ea2021-09-24 21:56:49 +080050 testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
Scott Nienbdcefbc2021-04-23 17:23:06 +080051 testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
leo huang76d3d532022-05-03 00:54:01 +080052 testImplementation(project(":camera:camera-video"))
Trevor McGuire89ca96a2019-02-19 11:38:44 -080053 testImplementation(project(":camera:camera-testing"))
Tahsin Masrur3e64e2f2024-01-17 15:24:52 +080054 testImplementation(project(":internal-testutils-truth"))
Jeremy Woods5dc7b572023-05-01 22:46:22 +000055 testImplementation("androidx.arch.core:core-testing:2.2.0")
Aurimas Liutikasb20296a2021-12-21 15:56:47 -080056 testImplementation(libs.junit) // Needed for Assert.assertThrows
Aurimas Liutikasff7924b2022-07-22 15:41:22 -070057 testImplementation("org.codehaus.plexus:plexus-utils:3.4.1")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080058
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070059 androidTestImplementation(libs.testExtJunit)
60 androidTestImplementation(libs.testCore)
61 androidTestImplementation(libs.testRunner)
62 androidTestImplementation(libs.testRules)
63 androidTestImplementation(libs.truth)
64 androidTestImplementation(libs.testUiautomator)
Charcoal Chen704df962022-09-30 08:44:46 +000065 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070066 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
Ian Lake64c858b2019-09-27 14:34:08 -070067 androidTestImplementation("androidx.appcompat:appcompat:1.1.0")
Tahsin Masrur068199ff2023-06-01 12:20:32 +080068 androidTestImplementation(project(":camera:camera-testing")) {
69 // Ensure camera-testing does not pull in androidx.test dependencies
70 exclude(group:"androidx.test")
71 }
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070072 androidTestImplementation(libs.kotlinStdlib)
73 androidTestImplementation(libs.kotlinCoroutinesAndroid)
natnaelbelaya817dd92024-01-17 10:30:59 -050074 androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0")
charcoalchen005c60b2020-09-02 14:16:59 +080075 androidTestImplementation(project(":internal-testutils-truth"))
Trevor McGuire04438ba2020-12-14 23:40:02 +000076 androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
Trevor McGuire3db09612020-12-07 01:18:55 -080077 androidTestImplementation("androidx.exifinterface:exifinterface:1.0.0")
Scott Nienba3698b2021-08-10 11:17:54 +080078 androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
WenHung_Tengb72a4e02022-08-10 16:48:06 +080079 androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080080}
81android {
Omar Ismail72444772024-05-14 14:55:28 +010082 buildTypes.configureEach {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080083 consumerProguardFiles "proguard-rules.pro"
Trevor McGuiref2cec9e2020-02-18 21:56:00 -080084 }
85
System Administratorc4ab0a12022-04-13 12:05:20 -070086 lintOptions {
87 enable 'CameraXQuirksClassDetector'
88 }
89
Trevor McGuire89ca96a2019-02-19 11:38:44 -080090 // Use Robolectric 4.+
91 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070092 namespace "androidx.camera.camera2"
Trevor McGuire89ca96a2019-02-19 11:38:44 -080093}
David M. Chen389eda02019-04-01 16:32:06 -070094
Aurimas Liutikas634a5bb2023-05-26 13:41:02 -070095tasks.withType(Test).configureEach { test ->
96 test.maxParallelForks(2)
97}
98
David M. Chen389eda02019-04-01 16:32:06 -070099androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -0400100 name = "Camera2"
Omar Ismail86e66062024-05-03 16:10:50 +0100101 type = LibraryType.PUBLISHED_LIBRARY
Trevor McGuire89ca96a2019-02-19 11:38:44 -0800102 inceptionYear = "2019"
103 description = "Camera2 implementation and extensions for the Jetpack Camera Library, a " +
104 "library providing a consistent and reliable camera foundation that enables great " +
105 "camera driven experiences across all of Android."
Jinseong Jeon999075e2023-08-22 00:40:11 -0700106 metalavaK2UastEnabled = true
Aurimas Liutikas5c5419a2024-05-29 15:26:58 -0700107 legacyDisableKotlinStrictApiMode = true
Trevor McGuire89ca96a2019-02-19 11:38:44 -0800108}