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 | |
Trevor McGuire | 148585e | 2021-01-27 23:03:04 -0800 | [diff] [blame] | 17 | |
Jelle Fresen | 4a13c56 | 2021-11-26 16:50:44 +0000 | [diff] [blame] | 18 | import androidx.build.LibraryType |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 19 | import androidx.build.Publish |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 20 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 21 | |
| 22 | plugins { |
Wenhung Teng | 73b1dbd | 2019-04-08 09:11:18 -0700 | [diff] [blame] | 23 | id("AndroidXPlugin") |
| 24 | id("com.android.library") |
Trevor McGuire | 148585e | 2021-01-27 23:03:04 -0800 | [diff] [blame] | 25 | id("kotlin-android") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | dependencies { |
Aurimas Liutikas | fba96cb | 2022-08-23 08:48:34 -0700 | [diff] [blame] | 29 | implementation("androidx.test:core:1.4.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 30 | implementation(libs.testRules) |
| 31 | implementation(libs.testUiautomator) |
leo huang | 39b7314 | 2021-05-18 15:14:24 +0800 | [diff] [blame] | 32 | api("androidx.annotation:annotation:1.2.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 33 | implementation(libs.guavaListenableFuture) |
Ian Lake | 64c858b | 2019-09-27 14:34:08 -0700 | [diff] [blame] | 34 | implementation("androidx.appcompat:appcompat:1.1.0") |
Franklin Wu | ae0a267 | 2020-06-25 17:18:44 -0700 | [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") |
Ian Lake | 0e005915 | 2019-09-27 14:43:23 -0700 | [diff] [blame] | 37 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
WenHung_Teng | b72a4e0 | 2022-08-10 16:48:06 +0800 | [diff] [blame] | 38 | implementation("androidx.test.espresso:espresso-core:3.3.0") |
WenHung_Teng | 7ed0778 | 2019-08-29 13:59:12 +0800 | [diff] [blame] | 39 | implementation("androidx.test.espresso:espresso-idling-resource:3.1.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 40 | implementation(libs.junit) |
| 41 | implementation(libs.kotlinStdlib) |
| 42 | implementation(libs.kotlinCoroutinesAndroid) |
Trevor McGuire | 8808219 | 2019-05-02 19:24:26 -0700 | [diff] [blame] | 43 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 44 | testImplementation(libs.testCore) |
| 45 | testImplementation(libs.testRunner) |
| 46 | testImplementation(libs.junit) |
| 47 | testImplementation(libs.truth) |
| 48 | testImplementation(libs.robolectric) |
Trevor McGuire | 2f60374 | 2022-09-17 05:17:46 +0000 | [diff] [blame^] | 49 | testImplementation(libs.mockitoCore4) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 50 | } |
Franklin Wu | dbfeed8 | 2019-05-30 16:54:25 -0700 | [diff] [blame] | 51 | |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 52 | android { |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 53 | defaultConfig { |
charcoalchen | b4f5893 | 2020-08-18 17:35:40 +0800 | [diff] [blame] | 54 | externalNativeBuild { |
| 55 | cmake { |
| 56 | cppFlags "-std=c++17" |
| 57 | arguments "-DCMAKE_VERBOSE_MAKEFILE=ON" |
| 58 | } |
| 59 | } |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 60 | } |
Trevor McGuire | b4200b2 | 2019-12-09 18:28:41 -0800 | [diff] [blame] | 61 | |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 62 | lintOptions { |
| 63 | enable 'CameraXQuirksClassDetector' |
| 64 | } |
| 65 | |
Trevor McGuire | b4200b2 | 2019-12-09 18:28:41 -0800 | [diff] [blame] | 66 | // Use Robolectric 4.+ |
| 67 | testOptions.unitTests.includeAndroidResources = true |
charcoalchen | b4f5893 | 2020-08-18 17:35:40 +0800 | [diff] [blame] | 68 | |
| 69 | externalNativeBuild { |
| 70 | cmake { |
charcoalchen | b4f5893 | 2020-08-18 17:35:40 +0800 | [diff] [blame] | 71 | path "src/main/cpp/CMakeLists.txt" |
Fred Sladkey | 7c32b45 | 2022-01-20 17:02:09 -0500 | [diff] [blame] | 72 | version libs.versions.cmake.get() |
charcoalchen | b4f5893 | 2020-08-18 17:35:40 +0800 | [diff] [blame] | 73 | } |
| 74 | } |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 75 | namespace "androidx.camera.testing" |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 76 | } |
Trevor McGuire | b4200b2 | 2019-12-09 18:28:41 -0800 | [diff] [blame] | 77 | |
David M. Chen | 389eda0 | 2019-04-01 16:32:06 -0700 | [diff] [blame] | 78 | androidx { |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 79 | name = "Jetpack Camera Testing Library" |
Jelle Fresen | 4a13c56 | 2021-11-26 16:50:44 +0000 | [diff] [blame] | 80 | type = LibraryType.INTERNAL_TEST_LIBRARY |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 81 | publish = Publish.NONE |
Trevor McGuire | 8045819 | 2019-04-08 14:49:13 -0700 | [diff] [blame] | 82 | mavenGroup = LibraryGroups.CAMERA |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 83 | inceptionYear = "2019" |
| 84 | description = "Testing components for the Jetpack Camera Library, a library providing a " + |
| 85 | "consistent and reliable camera foundation that enables great camera driven " +"" + |
| 86 | "experiences across all of Android." |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 87 | } |