Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [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 | */ |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 24 | import androidx.build.LibraryType |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 25 | |
| 26 | plugins { |
Wenhung Teng | 73b1dbd | 2019-04-08 09:11:18 -0700 | [diff] [blame] | 27 | id("AndroidXPlugin") |
| 28 | id("com.android.library") |
charcoalchen | 005c60b | 2020-09-02 14:16:59 +0800 | [diff] [blame] | 29 | id("kotlin-android") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | dependencies { |
| 33 | api(project(":camera:camera-core")) |
leo huang | 39b7314 | 2021-05-18 15:14:24 +0800 | [diff] [blame] | 34 | api("androidx.annotation:annotation:1.2.0") |
TY Chang | 15ef1c2 | 2020-11-20 15:48:43 +0800 | [diff] [blame] | 35 | implementation("androidx.core:core:1.1.0") |
Ian Lake | 0e005915 | 2019-09-27 14:43:23 -0700 | [diff] [blame] | 36 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 37 | implementation(libs.guavaListenableFuture) |
| 38 | implementation(libs.autoValueAnnotations) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 39 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 40 | annotationProcessor(libs.autoValue) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 41 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 42 | testImplementation(libs.testCore) |
| 43 | testImplementation(libs.testRunner) |
| 44 | testImplementation(libs.junit) |
| 45 | testImplementation(libs.truth) |
WenHung_Teng | 2fa5f70 | 2021-12-09 11:35:04 +0800 | [diff] [blame] | 46 | testImplementation(libs.robolectric) |
Aurimas Liutikas | 759f968 | 2022-10-05 07:01:37 -0700 | [diff] [blame] | 47 | testImplementation(libs.mockitoCore4) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 48 | testImplementation(libs.kotlinCoroutinesTest) |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 49 | testImplementation("androidx.annotation:annotation-experimental:1.4.0") |
WenHung_Teng | d43a6ea | 2021-09-24 21:56:49 +0800 | [diff] [blame] | 50 | testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
Scott Nien | bdcefbc | 2021-04-23 17:23:06 +0800 | [diff] [blame] | 51 | testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1") |
leo huang | 76d3d53 | 2022-05-03 00:54:01 +0800 | [diff] [blame] | 52 | testImplementation(project(":camera:camera-video")) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 53 | testImplementation(project(":camera:camera-testing")) |
Tahsin Masrur | 3e64e2f | 2024-01-17 15:24:52 +0800 | [diff] [blame] | 54 | testImplementation(project(":internal-testutils-truth")) |
Jeremy Woods | 5dc7b57 | 2023-05-01 22:46:22 +0000 | [diff] [blame] | 55 | testImplementation("androidx.arch.core:core-testing:2.2.0") |
Aurimas Liutikas | b20296a | 2021-12-21 15:56:47 -0800 | [diff] [blame] | 56 | testImplementation(libs.junit) // Needed for Assert.assertThrows |
Aurimas Liutikas | ff7924b | 2022-07-22 15:41:22 -0700 | [diff] [blame] | 57 | testImplementation("org.codehaus.plexus:plexus-utils:3.4.1") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 58 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 59 | androidTestImplementation(libs.testExtJunit) |
| 60 | androidTestImplementation(libs.testCore) |
| 61 | androidTestImplementation(libs.testRunner) |
| 62 | androidTestImplementation(libs.testRules) |
| 63 | androidTestImplementation(libs.truth) |
| 64 | androidTestImplementation(libs.testUiautomator) |
Charcoal Chen | 704df96 | 2022-09-30 08:44:46 +0000 | [diff] [blame] | 65 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 66 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Ian Lake | 64c858b | 2019-09-27 14:34:08 -0700 | [diff] [blame] | 67 | androidTestImplementation("androidx.appcompat:appcompat:1.1.0") |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 68 | androidTestImplementation(project(":camera:camera-testing")) { |
| 69 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 70 | exclude(group:"androidx.test") |
| 71 | } |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 72 | androidTestImplementation(libs.kotlinStdlib) |
| 73 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 74 | androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0") |
charcoalchen | 005c60b | 2020-09-02 14:16:59 +0800 | [diff] [blame] | 75 | androidTestImplementation(project(":internal-testutils-truth")) |
Trevor McGuire | 04438ba | 2020-12-14 23:40:02 +0000 | [diff] [blame] | 76 | androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1") |
Trevor McGuire | 3db0961 | 2020-12-07 01:18:55 -0800 | [diff] [blame] | 77 | androidTestImplementation("androidx.exifinterface:exifinterface:1.0.0") |
Scott Nien | ba3698b | 2021-08-10 11:17:54 +0800 | [diff] [blame] | 78 | androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
WenHung_Teng | b72a4e0 | 2022-08-10 16:48:06 +0800 | [diff] [blame] | 79 | androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 80 | } |
| 81 | android { |
Omar Ismail | 7244477 | 2024-05-14 14:55:28 +0100 | [diff] [blame] | 82 | buildTypes.configureEach { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 83 | consumerProguardFiles "proguard-rules.pro" |
Trevor McGuire | f2cec9e | 2020-02-18 21:56:00 -0800 | [diff] [blame] | 84 | } |
| 85 | |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 86 | lintOptions { |
| 87 | enable 'CameraXQuirksClassDetector' |
| 88 | } |
| 89 | |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 90 | // Use Robolectric 4.+ |
| 91 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 92 | namespace "androidx.camera.camera2" |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 93 | } |
David M. Chen | 389eda0 | 2019-04-01 16:32:06 -0700 | [diff] [blame] | 94 | |
Aurimas Liutikas | 634a5bb | 2023-05-26 13:41:02 -0700 | [diff] [blame] | 95 | tasks.withType(Test).configureEach { test -> |
| 96 | test.maxParallelForks(2) |
| 97 | } |
| 98 | |
David M. Chen | 389eda0 | 2019-04-01 16:32:06 -0700 | [diff] [blame] | 99 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 100 | name = "Camera2" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 101 | type = LibraryType.PUBLISHED_LIBRARY |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 102 | 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 Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 106 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 107 | legacyDisableKotlinStrictApiMode = true |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 108 | } |