blob: 0e56777d7409b0e1852153c2e58c4a890b221559 [file] [log] [blame]
Paul Rohde5a37cb22020-12-04 15:14:50 -08001/*
2 * Copyright 2020 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 Songee0da742024-01-03 14:08:46 -080017/**
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 Ismail86e66062024-05-03 16:10:50 +010024import androidx.build.LibraryType
Paul Rohde5a37cb22020-12-04 15:14:50 -080025import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
26
Paul Rohde5a37cb22020-12-04 15:14:50 -080027plugins {
28 id("AndroidXPlugin")
29 id("com.android.library")
30 id("kotlin-android")
31}
32
33dependencies {
34 // Classes and types that are needed at compile & runtime
Aurimas Liutikas96f0b302024-07-25 15:49:23 -070035 api("androidx.annotation:annotation:1.8.1")
Paul Rohde5a37cb22020-12-04 15:14:50 -080036
37 // Classes and types that are only needed at runtime
Jasmine Chen1cbb7102023-05-24 15:37:51 -070038 implementation(libs.atomicFu)
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070039 implementation(libs.kotlinStdlib)
40 implementation(libs.kotlinCoroutinesGuava)
Paul Rohdec471ce02022-08-20 21:11:32 -070041 implementation(libs.kotlinCoroutinesTest)
Paul Rohde5a37cb22020-12-04 15:14:50 -080042 implementation(project(":camera:camera-camera2-pipe"))
43
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070044 testImplementation(libs.testCore)
45 testImplementation(libs.testRunner)
46 testImplementation(libs.junit)
47 testImplementation(libs.robolectric)
48 testImplementation(libs.truth)
49 testImplementation(libs.kotlinCoroutinesTest)
Paul Rohde5a37cb22020-12-04 15:14:50 -080050}
51
52android {
System Administratorc4ab0a12022-04-13 12:05:20 -070053 lintOptions {
54 enable 'CameraXQuirksClassDetector'
55 }
Paul Rohde5a37cb22020-12-04 15:14:50 -080056 // Use Robolectric 4.+
57 testOptions.unitTests.includeAndroidResources = true
Aurimas Liutikas77952822024-12-04 18:00:17 -080058 namespace = "androidx.camera.camera2.pipe.testing"
Paul Rohde5a37cb22020-12-04 15:14:50 -080059}
60
Paul Rohdec471ce02022-08-20 21:11:32 -070061// Allow usage of Kotlin's @OptIn.
62tasks.withType(KotlinCompile).configureEach {
63 kotlinOptions {
64 freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"]
65 }
66}
67
Paul Rohde5a37cb22020-12-04 15:14:50 -080068androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -040069 name = "Camera2 Pipe Testing"
Omar Ismail86e66062024-05-03 16:10:50 +010070 type = LibraryType.PUBLISHED_LIBRARY
Paul Rohde5a37cb22020-12-04 15:14:50 -080071 mavenVersion = LibraryVersions.CAMERA_PIPE
Paul Rohde5a37cb22020-12-04 15:14:50 -080072 inceptionYear = "2020"
Alan Viverettec9e1fd72023-05-08 17:36:59 -040073 description = "Testing components for the Camera2 Pipe Library, a library providing a " +
Paul Rohde5a37cb22020-12-04 15:14:50 -080074 "consistent and reliable camera foundation that enables great camera driven " +
75 "experiences across all of Android."
Julia McClellanf37eb982024-02-02 10:43:51 -050076 doNotDocumentReason = "Not shipped externally"
Paul Rohde5a37cb22020-12-04 15:14:50 -080077}