blob: 9957015b6638b8185a63e8d54929e0a7b544ed5d [file] [log] [blame]
Franklin Wu0c88a3f2019-10-23 15:37:05 -07001/*
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
Franklin Wu0c88a3f2019-10-23 15:37:05 -070018import androidx.build.Publish
19
20plugins {
21 id("AndroidXPlugin")
22 id("com.android.library")
Trevor McGuirecf8e22b2019-11-14 22:12:36 -080023 id("kotlin-android")
Franklin Wu0c88a3f2019-10-23 15:37:05 -070024}
25
26dependencies {
Franklin Wu4d89be12019-10-23 15:38:43 -070027 api("androidx.lifecycle:lifecycle-common:2.1.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070028 api(libs.guavaListenableFuture)
Trevor McGuire06e54fd2019-12-27 15:43:10 -080029 api(project(":camera:camera-core"))
Nick Anthonybf92cbc2020-02-10 21:11:51 +000030 implementation("androidx.core:core:1.1.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070031 implementation(libs.autoValueAnnotations)
Charcoal Chena6b07762021-09-09 11:26:35 +080032 implementation("androidx.concurrent:concurrent-futures:1.0.0")
TY Chang15ef1c22020-11-20 15:48:43 +080033
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070034 annotationProcessor(libs.autoValue)
Trevor McGuirecf8e22b2019-11-14 22:12:36 -080035
Trevor McGuire836dc2a2021-09-22 16:46:22 -070036 androidTestImplementation(libs.multidex)
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070037 androidTestImplementation(libs.testExtJunit)
38 androidTestImplementation(libs.testCore)
39 androidTestImplementation(libs.testRunner)
40 androidTestImplementation(libs.testRules)
41 androidTestImplementation(libs.truth)
Tahsin Masrur068199ff2023-06-01 12:20:32 +080042 androidTestImplementation(project(":camera:camera-testing")) {
43 // Ensure camera-testing does not pull in androidx.test dependencies
44 exclude(group:"androidx.test")
45 }
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070046 androidTestImplementation(libs.kotlinStdlib)
47 androidTestImplementation(libs.kotlinCoroutinesAndroid)
Scott Nienbdcefbc2021-04-23 17:23:06 +080048 androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0")
49 androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
Trevor McGuirecf8e22b2019-11-14 22:12:36 -080050 androidTestImplementation(project(":internal-testutils-truth"))
Trevor McGuire04438ba2020-12-14 23:40:02 +000051 androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
Franklin Wu0c88a3f2019-10-23 15:37:05 -070052}
53
54android {
55 defaultConfig {
Trevor McGuire836dc2a2021-09-22 16:46:22 -070056 multiDexEnabled = true
Franklin Wu0c88a3f2019-10-23 15:37:05 -070057 }
System Administratorc4ab0a12022-04-13 12:05:20 -070058 lintOptions {
59 enable 'CameraXQuirksClassDetector'
60 }
Franklin Wu0c88a3f2019-10-23 15:37:05 -070061 // Use Robolectric 4.+
62 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070063 namespace "androidx.camera.lifecycle"
Franklin Wu0c88a3f2019-10-23 15:37:05 -070064}
65
66androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -040067 name = "Camera Lifecycle"
Eric Ng956c158a2019-11-06 13:14:55 -080068 publish = Publish.SNAPSHOT_AND_RELEASE
Franklin Wu0c88a3f2019-10-23 15:37:05 -070069 inceptionYear = "2019"
70 description = "Lifecycle components for the Jetpack Camera Library, a library providing a " +
71 "consistent and reliable camera foundation that enables great camera driven " +
72 "experiences across all of Android."
Franklin Wu0c88a3f2019-10-23 15:37:05 -070073}