blob: dd117c78e8b6642372e977411cb3c97ab2dec8bc [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
TY Chang15ef1c22020-11-20 15:48:43 +080017
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070018import androidx.build.Publish
Trevor McGuire89ca96a2019-02-19 11:38:44 -080019
20plugins {
Wenhung Teng73b1dbd2019-04-08 09:11:18 -070021 id("AndroidXPlugin")
22 id("com.android.library")
charcoalchen005c60b2020-09-02 14:16:59 +080023 id("kotlin-android")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080024}
25
26dependencies {
27 api(project(":camera:camera-core"))
leo huang39b73142021-05-18 15:14:24 +080028 api("androidx.annotation:annotation:1.2.0")
TY Chang15ef1c22020-11-20 15:48:43 +080029 implementation("androidx.core:core:1.1.0")
Ian Lake0e0059152019-09-27 14:43:23 -070030 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070031 implementation(libs.guavaListenableFuture)
32 implementation(libs.autoValueAnnotations)
Trevor McGuire89ca96a2019-02-19 11:38:44 -080033
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070034 annotationProcessor(libs.autoValue)
Trevor McGuire89ca96a2019-02-19 11:38:44 -080035
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070036 testImplementation(libs.testCore)
37 testImplementation(libs.testRunner)
38 testImplementation(libs.junit)
39 testImplementation(libs.truth)
WenHung_Teng2fa5f702021-12-09 11:35:04 +080040 testImplementation(libs.robolectric)
Trevor McGuire2f603742022-09-17 05:17:46 +000041 testImplementation(libs.mockitoCore4)
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070042 testImplementation(libs.kotlinCoroutinesTest)
Scott Nienbdcefbc2021-04-23 17:23:06 +080043 testImplementation("androidx.annotation:annotation-experimental:1.1.0")
WenHung_Tengd43a6ea2021-09-24 21:56:49 +080044 testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
Scott Nienbdcefbc2021-04-23 17:23:06 +080045 testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
leo huang76d3d532022-05-03 00:54:01 +080046 testImplementation(project(":camera:camera-video"))
Trevor McGuire89ca96a2019-02-19 11:38:44 -080047 testImplementation(project(":camera:camera-testing"))
husaynhakeem35f37292021-03-15 13:57:44 -070048 testImplementation("androidx.arch.core:core-testing:2.1.0")
Aurimas Liutikasb20296a2021-12-21 15:56:47 -080049 testImplementation(libs.junit) // Needed for Assert.assertThrows
Aurimas Liutikasff7924b2022-07-22 15:41:22 -070050 testImplementation("org.codehaus.plexus:plexus-utils:3.4.1")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080051
Trevor McGuire4983db32021-09-21 17:21:19 -070052 androidTestImplementation(libs.multidex)
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.testUiautomator)
Trevor McGuire2f603742022-09-17 05:17:46 +000059 androidTestImplementation(libs.mockitoCore4, excludes.bytebuddy) // DexMaker has it's own MockMaker
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070060 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
Ian Lake64c858b2019-09-27 14:34:08 -070061 androidTestImplementation("androidx.appcompat:appcompat:1.1.0")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080062 androidTestImplementation(project(":camera:camera-testing"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070063 androidTestImplementation(libs.kotlinStdlib)
64 androidTestImplementation(libs.kotlinCoroutinesAndroid)
Scott Nienbdcefbc2021-04-23 17:23:06 +080065 androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0")
charcoalchen005c60b2020-09-02 14:16:59 +080066 androidTestImplementation(project(":internal-testutils-truth"))
Trevor McGuire04438ba2020-12-14 23:40:02 +000067 androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
Trevor McGuire3db09612020-12-07 01:18:55 -080068 androidTestImplementation("androidx.exifinterface:exifinterface:1.0.0")
Scott Nienba3698b2021-08-10 11:17:54 +080069 androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
WenHung_Tengb72a4e02022-08-10 16:48:06 +080070 androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080071}
72android {
Trevor McGuire89ca96a2019-02-19 11:38:44 -080073 defaultConfig {
Trevor McGuire4983db32021-09-21 17:21:19 -070074 multiDexEnabled = true
Trevor McGuire89ca96a2019-02-19 11:38:44 -080075 }
76
Trevor McGuiref2cec9e2020-02-18 21:56:00 -080077 buildTypes.all {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080078 consumerProguardFiles "proguard-rules.pro"
Trevor McGuiref2cec9e2020-02-18 21:56:00 -080079 }
80
System Administratorc4ab0a12022-04-13 12:05:20 -070081 lintOptions {
82 enable 'CameraXQuirksClassDetector'
83 }
84
Trevor McGuire89ca96a2019-02-19 11:38:44 -080085 // Use Robolectric 4.+
86 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070087 namespace "androidx.camera.camera2"
Trevor McGuire89ca96a2019-02-19 11:38:44 -080088}
David M. Chen389eda02019-04-01 16:32:06 -070089
90androidx {
Trevor McGuire89ca96a2019-02-19 11:38:44 -080091 name = "Jetpack Camera Library Camera2 Implementation/Extensions"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070092 publish = Publish.SNAPSHOT_AND_RELEASE
Trevor McGuire80458192019-04-08 14:49:13 -070093 mavenGroup = LibraryGroups.CAMERA
Trevor McGuire89ca96a2019-02-19 11:38:44 -080094 inceptionYear = "2019"
95 description = "Camera2 implementation and extensions for the Jetpack Camera Library, a " +
96 "library providing a consistent and reliable camera foundation that enables great " +
97 "camera driven experiences across all of Android."
98}