blob: ec539d7bc7ef24aa8fde40be733a05b08d2b5f58 [file] [log] [blame]
Trevor McGuire89ca96a2019-02-19 11:38:44 -08001/*
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 McGuire148585e2021-01-27 23:03:04 -080017
Jelle Fresen4a13c562021-11-26 16:50:44 +000018import androidx.build.LibraryType
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070019import androidx.build.Publish
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070020import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Trevor McGuire89ca96a2019-02-19 11:38:44 -080021
22plugins {
Wenhung Teng73b1dbd2019-04-08 09:11:18 -070023 id("AndroidXPlugin")
24 id("com.android.library")
Trevor McGuire148585e2021-01-27 23:03:04 -080025 id("kotlin-android")
Trevor McGuire89ca96a2019-02-19 11:38:44 -080026}
27
28dependencies {
Aurimas Liutikasfba96cb2022-08-23 08:48:34 -070029 implementation("androidx.test:core:1.4.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070030 implementation(libs.testRules)
31 implementation(libs.testUiautomator)
leo huang39b73142021-05-18 15:14:24 +080032 api("androidx.annotation:annotation:1.2.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070033 implementation(libs.guavaListenableFuture)
Ian Lake64c858b2019-09-27 14:34:08 -070034 implementation("androidx.appcompat:appcompat:1.1.0")
Franklin Wuae0a2672020-06-25 17:18:44 -070035 api(project(":camera:camera-core"))
Nick Anthonybf92cbc2020-02-10 21:11:51 +000036 implementation("androidx.core:core:1.1.0")
Ian Lake0e0059152019-09-27 14:43:23 -070037 implementation("androidx.concurrent:concurrent-futures:1.0.0")
WenHung_Tengb72a4e02022-08-10 16:48:06 +080038 implementation("androidx.test.espresso:espresso-core:3.3.0")
WenHung_Teng7ed07782019-08-29 13:59:12 +080039 implementation("androidx.test.espresso:espresso-idling-resource:3.1.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070040 implementation(libs.junit)
41 implementation(libs.kotlinStdlib)
42 implementation(libs.kotlinCoroutinesAndroid)
Trevor McGuire88082192019-05-02 19:24:26 -070043
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070044 testImplementation(libs.testCore)
45 testImplementation(libs.testRunner)
46 testImplementation(libs.junit)
47 testImplementation(libs.truth)
48 testImplementation(libs.robolectric)
Trevor McGuire2f603742022-09-17 05:17:46 +000049 testImplementation(libs.mockitoCore4)
Trevor McGuire89ca96a2019-02-19 11:38:44 -080050}
Franklin Wudbfeed82019-05-30 16:54:25 -070051
Trevor McGuire89ca96a2019-02-19 11:38:44 -080052android {
Trevor McGuire89ca96a2019-02-19 11:38:44 -080053 defaultConfig {
charcoalchenb4f58932020-08-18 17:35:40 +080054 externalNativeBuild {
55 cmake {
56 cppFlags "-std=c++17"
57 arguments "-DCMAKE_VERBOSE_MAKEFILE=ON"
58 }
59 }
Trevor McGuire89ca96a2019-02-19 11:38:44 -080060 }
Trevor McGuireb4200b22019-12-09 18:28:41 -080061
System Administratorc4ab0a12022-04-13 12:05:20 -070062 lintOptions {
63 enable 'CameraXQuirksClassDetector'
64 }
65
Trevor McGuireb4200b22019-12-09 18:28:41 -080066 // Use Robolectric 4.+
67 testOptions.unitTests.includeAndroidResources = true
charcoalchenb4f58932020-08-18 17:35:40 +080068
69 externalNativeBuild {
70 cmake {
charcoalchenb4f58932020-08-18 17:35:40 +080071 path "src/main/cpp/CMakeLists.txt"
Fred Sladkey7c32b452022-01-20 17:02:09 -050072 version libs.versions.cmake.get()
charcoalchenb4f58932020-08-18 17:35:40 +080073 }
74 }
Aurimas Liutikasdcfa0352022-03-14 16:05:33 -070075 namespace "androidx.camera.testing"
Trevor McGuire89ca96a2019-02-19 11:38:44 -080076}
Trevor McGuireb4200b22019-12-09 18:28:41 -080077
David M. Chen389eda02019-04-01 16:32:06 -070078androidx {
Trevor McGuire89ca96a2019-02-19 11:38:44 -080079 name = "Jetpack Camera Testing Library"
Jelle Fresen4a13c562021-11-26 16:50:44 +000080 type = LibraryType.INTERNAL_TEST_LIBRARY
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070081 publish = Publish.NONE
Trevor McGuire80458192019-04-08 14:49:13 -070082 mavenGroup = LibraryGroups.CAMERA
Trevor McGuire89ca96a2019-02-19 11:38:44 -080083 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 McGuire89ca96a2019-02-19 11:38:44 -080087}