charcoalchen | 59ea07d | 2019-03-06 18:00:24 +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 |
charcoalchen | 59ea07d | 2019-03-06 18:00:24 +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") |
Franklin Wu | 4c8aa95 | 2020-07-22 18:12:07 -0700 | [diff] [blame] | 29 | id("kotlin-android") |
charcoalchen | 59ea07d | 2019-03-06 18:00:24 +0800 | [diff] [blame] | 30 | } |
| 31 | |
charcoalchen | 1f0c4ca | 2019-02-27 22:19:29 +0800 | [diff] [blame] | 32 | dependencies { |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 33 | api(libs.guavaListenableFuture) |
charcoalchen | 1f0c4ca | 2019-02-27 22:19:29 +0800 | [diff] [blame] | 34 | api(project(":camera:camera-core")) |
charcoalchen | 1f0c4ca | 2019-02-27 22:19:29 +0800 | [diff] [blame] | 35 | implementation("androidx.core:core:1.0.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.autoValueAnnotations) |
| 38 | annotationProcessor(libs.autoValue) |
Franklin Wu | 30c76f6 | 2019-04-15 16:03:23 -0700 | [diff] [blame] | 39 | |
Alan Viverette | c2ea01c | 2019-05-22 15:39:53 -0400 | [diff] [blame] | 40 | compileOnly(project(":camera:camera-extensions-stub")) |
WenHung_Teng | e7fca75 | 2019-05-28 11:03:23 +0800 | [diff] [blame] | 41 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 42 | testImplementation(libs.junit) |
Aurimas Liutikas | 759f968 | 2022-10-05 07:01:37 -0700 | [diff] [blame] | 43 | testImplementation(libs.mockitoCore4) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 44 | testImplementation(libs.robolectric) |
| 45 | testImplementation(libs.truth) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 46 | testImplementation(project(":camera:camera-testing")) |
WenHung_Teng | 1e28d76 | 2019-05-31 21:48:21 +0800 | [diff] [blame] | 47 | testImplementation(project(":camera:camera-extensions-stub")) |
Scott Nien | 4ea337b | 2022-11-09 22:57:43 +0800 | [diff] [blame] | 48 | testImplementation(libs.testCore) |
Tahsin Masrur | 1d71e39 | 2023-05-23 17:03:33 +0800 | [diff] [blame] | 49 | testImplementation(libs.testRunner) |
Scott Nien | ebd661d | 2023-12-29 11:10:11 +0800 | [diff] [blame] | 50 | testImplementation(libs.truth) |
WenHung_Teng | c55475c | 2019-06-07 00:10:20 +0800 | [diff] [blame] | 51 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 52 | androidTestImplementation(libs.testExtJunit) |
| 53 | androidTestImplementation(libs.testRunner) |
| 54 | androidTestImplementation(libs.testCore) |
| 55 | androidTestImplementation(libs.testRules) |
| 56 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has its own MockMaker |
Charcoal Chen | 14ef719 | 2021-07-07 11:42:53 +0800 | [diff] [blame] | 57 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 58 | androidTestImplementation(libs.kotlinStdlib) |
Charcoal Chen | 704df96 | 2022-09-30 08:44:46 +0000 | [diff] [blame] | 59 | androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has its own MockMaker |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 60 | androidTestImplementation(libs.truth) |
Scott Nien | 97378a1f | 2023-12-08 18:58:40 +0800 | [diff] [blame] | 61 | androidTestImplementation(project(":camera:camera-camera2")) |
Jasmine Chen | c463947 | 2023-12-19 16:49:30 -0800 | [diff] [blame] | 62 | androidTestImplementation(project(":camera:camera-camera2-pipe-integration")) |
Charcoal Chen | 80e42c9 | 2021-04-29 15:45:05 +0800 | [diff] [blame] | 63 | androidTestImplementation(project(":camera:camera-lifecycle")) |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 64 | androidTestImplementation(project(":camera:camera-testing")) { |
| 65 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 66 | exclude(group:"androidx.test") |
| 67 | } |
Charcoal Chen | f5e6ce2 | 2021-11-12 09:46:44 +0800 | [diff] [blame] | 68 | androidTestImplementation(project(":camera:camera-video")) |
Franklin Wu | 4c8aa95 | 2020-07-22 18:12:07 -0700 | [diff] [blame] | 69 | androidTestImplementation(project(":internal-testutils-truth")) |
Alan Viverette | 7091d83 | 2021-07-14 17:04:06 -0400 | [diff] [blame] | 70 | androidTestImplementation(project(":camera:camera-testlib-extensions")) |
Trevor McGuire | b3841da | 2022-09-02 18:13:30 +0000 | [diff] [blame] | 71 | androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
WenHung_Teng | c55475c | 2019-06-07 00:10:20 +0800 | [diff] [blame] | 72 | // To use the testlib to have the implementation of the extensions-stub interface. |
charcoalchen | 1f0c4ca | 2019-02-27 22:19:29 +0800 | [diff] [blame] | 73 | } |
| 74 | |
charcoalchen | 59ea07d | 2019-03-06 18:00:24 +0800 | [diff] [blame] | 75 | android { |
Omar Ismail | 7244477 | 2024-05-14 14:55:28 +0100 | [diff] [blame] | 76 | buildTypes.configureEach { |
Charcoal Chen | b0ebb20 | 2021-09-29 14:32:40 +0800 | [diff] [blame] | 77 | consumerProguardFiles "proguard-rules.pro" |
| 78 | } |
| 79 | |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 80 | lintOptions { |
| 81 | enable 'CameraXQuirksClassDetector' |
| 82 | } |
| 83 | |
Franklin Wu | 52e8d41 | 2019-08-28 12:16:11 -0700 | [diff] [blame] | 84 | // Use Robolectric 4.+ |
| 85 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 86 | namespace "androidx.camera.extensions" |
WenHung_Teng | e7fca75 | 2019-05-28 11:03:23 +0800 | [diff] [blame] | 87 | } |
| 88 | |
David M. Chen | 389eda0 | 2019-04-01 16:32:06 -0700 | [diff] [blame] | 89 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 90 | name = "Camera Extensions" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 91 | type = LibraryType.PUBLISHED_LIBRARY |
charcoalchen | 59ea07d | 2019-03-06 18:00:24 +0800 | [diff] [blame] | 92 | inceptionYear = "2019" |
| 93 | description = "OEM Extensions for the Jetpack Camera Library, a library providing interfaces" + |
| 94 | " to integrate with OEM specific camera features." |
Jinseong Jeon | 999075e | 2023-08-22 00:40:11 -0700 | [diff] [blame] | 95 | metalavaK2UastEnabled = true |
Aurimas Liutikas | 5c5419a | 2024-05-29 15:26:58 -0700 | [diff] [blame] | 96 | legacyDisableKotlinStrictApiMode = true |
charcoalchen | 59ea07d | 2019-03-06 18:00:24 +0800 | [diff] [blame] | 97 | } |