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