Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 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 |
| 13 | * implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
Franklin Wu | 87eadea | 2019-02-15 14:01:24 -0800 | [diff] [blame] | 17 | plugins { |
| 18 | id("AndroidXPlugin") |
| 19 | id("com.android.application") |
fungja | 5e3d86b | 2019-09-13 11:31:54 -0700 | [diff] [blame] | 20 | id("kotlin-android") |
Franklin Wu | 87eadea | 2019-02-15 14:01:24 -0800 | [diff] [blame] | 21 | } |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 22 | |
| 23 | android { |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 24 | defaultConfig { |
Franklin Wu | 393daa9 | 2019-02-20 11:05:19 -0800 | [diff] [blame] | 25 | applicationId "androidx.camera.integration.core" |
Trevor McGuire | aa64b9c | 2020-05-27 00:43:02 +0000 | [diff] [blame] | 26 | |
| 27 | externalNativeBuild { |
| 28 | cmake { |
| 29 | cppFlags "-std=c++17" |
| 30 | arguments "-DCMAKE_VERBOSE_MAKEFILE=ON" |
| 31 | } |
| 32 | } |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 33 | } |
| 34 | |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 35 | buildTypes { |
| 36 | debug { |
Trevor McGuire | d369d39 | 2020-04-22 17:25:30 -0700 | [diff] [blame] | 37 | pseudoLocalesEnabled true |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | release { |
Trevor McGuire | f2cec9e | 2020-02-18 21:56:00 -0800 | [diff] [blame] | 41 | minifyEnabled true |
| 42 | shrinkResources true |
| 43 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt")) |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 44 | } |
| 45 | } |
Trevor McGuire | aa64b9c | 2020-05-27 00:43:02 +0000 | [diff] [blame] | 46 | |
| 47 | externalNativeBuild { |
| 48 | cmake { |
Trevor McGuire | aa64b9c | 2020-05-27 00:43:02 +0000 | [diff] [blame] | 49 | path "src/main/cpp/CMakeLists.txt" |
Fred Sladkey | 7c32b45 | 2022-01-20 17:02:09 -0500 | [diff] [blame] | 50 | version libs.versions.cmake.get() |
Trevor McGuire | aa64b9c | 2020-05-27 00:43:02 +0000 | [diff] [blame] | 51 | } |
| 52 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 53 | namespace "androidx.camera.integration.core" |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | dependencies { |
| 57 | // Internal library |
Franklin Wu | 87eadea | 2019-02-15 14:01:24 -0800 | [diff] [blame] | 58 | implementation(project(":camera:camera-camera2")) |
Paul Rohde | a1e169d | 2020-10-28 19:51:19 -0700 | [diff] [blame] | 59 | implementation(project(":camera:camera-camera2-pipe-integration")) |
fungja | 5e3d86b | 2019-09-13 11:31:54 -0700 | [diff] [blame] | 60 | implementation(project(":camera:camera-core")) |
Franklin Wu | 4d89be1 | 2019-10-23 15:38:43 -0700 | [diff] [blame] | 61 | implementation(project(":camera:camera-lifecycle")) |
Xi Zhang | 3487fb8 | 2022-07-28 16:07:24 -0700 | [diff] [blame] | 62 | implementation(project(":camera:camera-mlkit-vision")) |
Tahsin Masrur | 0ca1bb04 | 2023-09-29 09:56:30 +0800 | [diff] [blame] | 63 | implementation(project(":camera:camera-view")) |
leo huang | 625e16a | 2021-06-04 01:00:37 +0800 | [diff] [blame] | 64 | implementation(project(":camera:camera-video")) |
Aurimas Liutikas | 190091b | 2021-03-08 09:20:45 -0800 | [diff] [blame] | 65 | // Needed because AGP enforces same version between main and androidTest classpaths |
| 66 | implementation(project(":concurrent:concurrent-futures")) |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 67 | |
| 68 | // Android Support Library |
Aurimas Liutikas | b3483fd | 2021-06-04 16:56:37 -0700 | [diff] [blame] | 69 | api(libs.constraintLayout) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 70 | implementation(libs.guavaAndroid) |
| 71 | implementation(libs.espressoIdlingResource) |
WenHung_Teng | 0bd3c1e | 2021-07-06 09:04:29 +0800 | [diff] [blame] | 72 | implementation("androidx.appcompat:appcompat:1.3.0") |
leo huang | e6b504c | 2023-08-30 14:26:43 +0800 | [diff] [blame] | 73 | implementation("androidx.lifecycle:lifecycle-service:2.2.0") |
weginlee | 7fee91dc | 2021-04-19 17:34:53 +0800 | [diff] [blame] | 74 | // MLKit library: Barcode scanner |
Aurimas Liutikas | 2b445ff | 2022-10-11 12:32:16 -0700 | [diff] [blame] | 75 | implementation(libs.mlkitBarcode) { |
| 76 | exclude group: "androidx.fragment" |
| 77 | exclude group: "androidx.core" |
| 78 | exclude group: "androidx.exifinterface" |
| 79 | } |
TY Chang | 617b54e | 2023-08-11 14:18:21 +0800 | [diff] [blame] | 80 | // camera-testing added as 'implementation' dependency to include camera-testing activity in APK |
| 81 | implementation(project(":camera:camera-testing")) { |
| 82 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 83 | exclude(group:"androidx.test") |
| 84 | } |
fungja | 5e3d86b | 2019-09-13 11:31:54 -0700 | [diff] [blame] | 85 | |
Xi Zhang | 8bf9aa7 | 2020-03-25 13:34:08 -0700 | [diff] [blame] | 86 | // 3P library |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 87 | debugImplementation(libs.leakcanary) |
WenHung_Teng | eb6b350 | 2020-09-25 12:48:35 +0800 | [diff] [blame] | 88 | // Testing resource dependency for manifest |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 89 | debugImplementation(project(":camera:camera-testing")) { |
| 90 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 91 | exclude(group:"androidx.test") |
| 92 | } |
Aurimas Liutikas | fba96cb | 2022-08-23 08:48:34 -0700 | [diff] [blame] | 93 | debugImplementation(libs.testCore) |
Brett Chabot | 6138690 | 2022-11-09 17:12:57 -0800 | [diff] [blame] | 94 | // explicitly add runner here to force consistency with androidTestImplementation |
| 95 | debugImplementation(libs.testRunner) |
Xi Zhang | 8bf9aa7 | 2020-03-25 13:34:08 -0700 | [diff] [blame] | 96 | |
Alan Viverette | 08421e1 | 2024-01-03 09:58:57 -0500 | [diff] [blame] | 97 | // Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath. |
natnaelbelay | a817dd9 | 2024-01-17 10:30:59 -0500 | [diff] [blame] | 98 | androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0") |
Alan Viverette | 08421e1 | 2024-01-03 09:58:57 -0500 | [diff] [blame] | 99 | |
fungja | 5e3d86b | 2019-09-13 11:31:54 -0700 | [diff] [blame] | 100 | // Testing framework |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 101 | androidTestImplementation(libs.testCore) |
| 102 | androidTestImplementation(libs.testExtJunit) |
| 103 | androidTestImplementation(libs.testRules) |
| 104 | androidTestImplementation(libs.testRunner) |
| 105 | androidTestImplementation(libs.testUiautomator) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 106 | androidTestImplementation(libs.espressoIdlingResource) |
| 107 | androidTestImplementation(libs.kotlinStdlib) |
| 108 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
| 109 | androidTestImplementation(libs.leakcanary) |
| 110 | androidTestImplementation(libs.leakcanaryInstrumentation) |
| 111 | androidTestImplementation(libs.truth) |
Tahsin Masrur | e586b0e | 2022-12-12 21:23:59 +0800 | [diff] [blame] | 112 | androidTestImplementation(project(":camera:camera-camera2")) |
Tahsin Masrur | 068199ff | 2023-06-01 12:20:32 +0800 | [diff] [blame] | 113 | androidTestImplementation(project(":camera:camera-testing")) { |
| 114 | // Ensure camera-testing does not pull in androidx.test dependencies |
| 115 | exclude(group:"androidx.test") |
| 116 | } |
Trevor McGuire | d369d39 | 2020-04-22 17:25:30 -0700 | [diff] [blame] | 117 | androidTestImplementation(project(":concurrent:concurrent-futures")) |
| 118 | androidTestImplementation(project(":concurrent:concurrent-futures-ktx")) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 119 | androidTestImplementation(project(":internal-testutils-runtime")) |
Marcello Galhardo | 32de0cc | 2024-05-14 15:18:55 +0100 | [diff] [blame] | 120 | androidTestImplementation(project(":internal-testutils-lifecycle")) |
Trevor McGuire | 2bdd734 | 2023-11-16 00:49:51 +0000 | [diff] [blame] | 121 | androidTestImplementation(project(":internal-testutils-truth")) |
Trevor McGuire | 89454ee | 2024-06-04 17:27:36 -0700 | [diff] [blame] | 122 | androidTestImplementation("androidx.core:core:1.1.0") |
Ian Lake | 6b6bf16 | 2021-08-25 22:23:04 -0700 | [diff] [blame] | 123 | androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1") |
Trevor McGuire | 89454ee | 2024-06-04 17:27:36 -0700 | [diff] [blame] | 124 | androidTestImplementation("androidx.palette:palette:1.0.0") |
WenHung_Teng | b72a4e0 | 2022-08-10 16:48:06 +0800 | [diff] [blame] | 125 | androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") |
Tahsin Masrur | 2dbe75f | 2023-01-12 02:31:00 +0800 | [diff] [blame] | 126 | androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1") |
Trevor McGuire | d369d39 | 2020-04-22 17:25:30 -0700 | [diff] [blame] | 127 | |
Tahsin Masrur | ed67d00 | 2024-01-03 13:01:06 +0800 | [diff] [blame] | 128 | testImplementation(libs.kotlinStdlib) |
| 129 | testImplementation(libs.kotlinCoroutinesAndroid) |
| 130 | testImplementation(libs.kotlinCoroutinesTest) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 131 | testImplementation(libs.junit) |
Tahsin Masrur | ed67d00 | 2024-01-03 13:01:06 +0800 | [diff] [blame] | 132 | testImplementation(libs.robolectric) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 133 | testImplementation(libs.truth) |
Tahsin Masrur | ed67d00 | 2024-01-03 13:01:06 +0800 | [diff] [blame] | 134 | testImplementation(project(":internal-testutils-ktx")) |
Trevor McGuire | c63cd73 | 2019-02-06 13:12:50 -0800 | [diff] [blame] | 135 | } |