Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 1 | /* |
| 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 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 |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 25 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 26 | |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 27 | plugins { |
| 28 | id("AndroidXPlugin") |
| 29 | id("com.android.library") |
| 30 | id("kotlin-android") |
| 31 | } |
| 32 | |
| 33 | dependencies { |
| 34 | // Classes and types that are needed at compile & runtime |
Aurimas Liutikas | 96f0b30 | 2024-07-25 15:49:23 -0700 | [diff] [blame] | 35 | api("androidx.annotation:annotation:1.8.1") |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 36 | |
| 37 | // Classes and types that are only needed at runtime |
Jasmine Chen | 1cbb710 | 2023-05-24 15:37:51 -0700 | [diff] [blame] | 38 | implementation(libs.atomicFu) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 39 | implementation(libs.kotlinStdlib) |
| 40 | implementation(libs.kotlinCoroutinesGuava) |
Paul Rohde | c471ce0 | 2022-08-20 21:11:32 -0700 | [diff] [blame] | 41 | implementation(libs.kotlinCoroutinesTest) |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 42 | implementation(project(":camera:camera-camera2-pipe")) |
| 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.robolectric) |
| 48 | testImplementation(libs.truth) |
| 49 | testImplementation(libs.kotlinCoroutinesTest) |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | android { |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 53 | lintOptions { |
| 54 | enable 'CameraXQuirksClassDetector' |
| 55 | } |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 56 | // Use Robolectric 4.+ |
| 57 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | 7795282 | 2024-12-04 18:00:17 -0800 | [diff] [blame] | 58 | namespace = "androidx.camera.camera2.pipe.testing" |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 59 | } |
| 60 | |
Paul Rohde | c471ce0 | 2022-08-20 21:11:32 -0700 | [diff] [blame] | 61 | // Allow usage of Kotlin's @OptIn. |
| 62 | tasks.withType(KotlinCompile).configureEach { |
| 63 | kotlinOptions { |
| 64 | freeCompilerArgs += ["-opt-in=kotlin.RequiresOptIn"] |
| 65 | } |
| 66 | } |
| 67 | |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 68 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 69 | name = "Camera2 Pipe Testing" |
Omar Ismail | 86e6606 | 2024-05-03 16:10:50 +0100 | [diff] [blame] | 70 | type = LibraryType.PUBLISHED_LIBRARY |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 71 | mavenVersion = LibraryVersions.CAMERA_PIPE |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 72 | inceptionYear = "2020" |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 73 | description = "Testing components for the Camera2 Pipe Library, a library providing a " + |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 74 | "consistent and reliable camera foundation that enables great camera driven " + |
| 75 | "experiences across all of Android." |
Julia McClellan | f37eb98 | 2024-02-02 10:43:51 -0500 | [diff] [blame] | 76 | doNotDocumentReason = "Not shipped externally" |
Paul Rohde | 5a37cb2 | 2020-12-04 15:14:50 -0800 | [diff] [blame] | 77 | } |