Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 1 | /* |
| 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 Chang | 15ef1c2 | 2020-11-20 15:48:43 +0800 | [diff] [blame] | 17 | |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 18 | import androidx.build.Publish |
| 19 | |
| 20 | plugins { |
| 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
Trevor McGuire | cf8e22b | 2019-11-14 22:12:36 -0800 | [diff] [blame] | 23 | id("kotlin-android") |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | dependencies { |
Franklin Wu | 4d89be1 | 2019-10-23 15:38:43 -0700 | [diff] [blame] | 27 | api("androidx.lifecycle:lifecycle-common:2.1.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 28 | api(libs.guavaListenableFuture) |
Trevor McGuire | 06e54fd | 2019-12-27 15:43:10 -0800 | [diff] [blame] | 29 | api(project(":camera:camera-core")) |
Nick Anthony | bf92cbc | 2020-02-10 21:11:51 +0000 | [diff] [blame] | 30 | implementation("androidx.core:core:1.1.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 31 | implementation(libs.autoValueAnnotations) |
Charcoal Chen | a6b0776 | 2021-09-09 11:26:35 +0800 | [diff] [blame] | 32 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
TY Chang | 15ef1c2 | 2020-11-20 15:48:43 +0800 | [diff] [blame] | 33 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 34 | annotationProcessor(libs.autoValue) |
Trevor McGuire | cf8e22b | 2019-11-14 22:12:36 -0800 | [diff] [blame] | 35 | |
Trevor McGuire | 836dc2a | 2021-09-22 16:46:22 -0700 | [diff] [blame] | 36 | androidTestImplementation(libs.multidex) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 37 | androidTestImplementation(libs.testExtJunit) |
| 38 | androidTestImplementation(libs.testCore) |
| 39 | androidTestImplementation(libs.testRunner) |
| 40 | androidTestImplementation(libs.testRules) |
| 41 | androidTestImplementation(libs.truth) |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 42 | androidTestImplementation(project(":camera:camera-testing")) { |
| 43 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 44 | exclude(group:"androidx.test") |
| 45 | } |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 46 | androidTestImplementation(libs.kotlinStdlib) |
| 47 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
Scott Nien | bdcefbc | 2021-04-23 17:23:06 +0800 | [diff] [blame] | 48 | androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0") |
| 49 | androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
Trevor McGuire | cf8e22b | 2019-11-14 22:12:36 -0800 | [diff] [blame] | 50 | androidTestImplementation(project(":internal-testutils-truth")) |
Trevor McGuire | 04438ba | 2020-12-14 23:40:02 +0000 | [diff] [blame] | 51 | androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1") |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | android { |
| 55 | defaultConfig { |
Trevor McGuire | 836dc2a | 2021-09-22 16:46:22 -0700 | [diff] [blame] | 56 | multiDexEnabled = true |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 57 | } |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 58 | lintOptions { |
| 59 | enable 'CameraXQuirksClassDetector' |
| 60 | } |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 61 | // Use Robolectric 4.+ |
| 62 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 63 | namespace "androidx.camera.lifecycle" |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 67 | name = "Camera Lifecycle" |
Eric Ng | 956c158a | 2019-11-06 13:14:55 -0800 | [diff] [blame] | 68 | publish = Publish.SNAPSHOT_AND_RELEASE |
Franklin Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 69 | 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 Wu | 0c88a3f | 2019-10-23 15:37:05 -0700 | [diff] [blame] | 73 | } |