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 | |
TY Chang | 15ef1c2 | 2020-11-20 15:48:43 +0800 | [diff] [blame] | 17 | |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 18 | import androidx.build.Publish |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 19 | |
| 20 | plugins { |
Wenhung Teng | 73b1dbd | 2019-04-08 09:11:18 -0700 | [diff] [blame] | 21 | id("AndroidXPlugin") |
| 22 | id("com.android.library") |
charcoalchen | 005c60b | 2020-09-02 14:16:59 +0800 | [diff] [blame] | 23 | id("kotlin-android") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | dependencies { |
| 27 | api(project(":camera:camera-core")) |
leo huang | 39b7314 | 2021-05-18 15:14:24 +0800 | [diff] [blame] | 28 | api("androidx.annotation:annotation:1.2.0") |
TY Chang | 15ef1c2 | 2020-11-20 15:48:43 +0800 | [diff] [blame] | 29 | implementation("androidx.core:core:1.1.0") |
Ian Lake | 0e005915 | 2019-09-27 14:43:23 -0700 | [diff] [blame] | 30 | implementation("androidx.concurrent:concurrent-futures:1.0.0") |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 31 | implementation(libs.guavaListenableFuture) |
| 32 | implementation(libs.autoValueAnnotations) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 33 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 34 | annotationProcessor(libs.autoValue) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 35 | |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 36 | testImplementation(libs.testCore) |
| 37 | testImplementation(libs.testRunner) |
| 38 | testImplementation(libs.junit) |
| 39 | testImplementation(libs.truth) |
WenHung_Teng | 2fa5f70 | 2021-12-09 11:35:04 +0800 | [diff] [blame] | 40 | testImplementation(libs.robolectric) |
Trevor McGuire | 2f60374 | 2022-09-17 05:17:46 +0000 | [diff] [blame] | 41 | testImplementation(libs.mockitoCore4) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 42 | testImplementation(libs.kotlinCoroutinesTest) |
Scott Nien | bdcefbc | 2021-04-23 17:23:06 +0800 | [diff] [blame] | 43 | testImplementation("androidx.annotation:annotation-experimental:1.1.0") |
WenHung_Teng | d43a6ea | 2021-09-24 21:56:49 +0800 | [diff] [blame] | 44 | testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
Scott Nien | bdcefbc | 2021-04-23 17:23:06 +0800 | [diff] [blame] | 45 | testImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1") |
leo huang | 76d3d53 | 2022-05-03 00:54:01 +0800 | [diff] [blame] | 46 | testImplementation(project(":camera:camera-video")) |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 47 | testImplementation(project(":camera:camera-testing")) |
husaynhakeem | 35f3729 | 2021-03-15 13:57:44 -0700 | [diff] [blame] | 48 | testImplementation("androidx.arch.core:core-testing:2.1.0") |
Aurimas Liutikas | b20296a | 2021-12-21 15:56:47 -0800 | [diff] [blame] | 49 | testImplementation(libs.junit) // Needed for Assert.assertThrows |
Aurimas Liutikas | ff7924b | 2022-07-22 15:41:22 -0700 | [diff] [blame] | 50 | testImplementation("org.codehaus.plexus:plexus-utils:3.4.1") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 51 | |
Trevor McGuire | 4983db3 | 2021-09-21 17:21:19 -0700 | [diff] [blame] | 52 | androidTestImplementation(libs.multidex) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 53 | androidTestImplementation(libs.testExtJunit) |
| 54 | androidTestImplementation(libs.testCore) |
| 55 | androidTestImplementation(libs.testRunner) |
| 56 | androidTestImplementation(libs.testRules) |
| 57 | androidTestImplementation(libs.truth) |
| 58 | androidTestImplementation(libs.testUiautomator) |
Trevor McGuire | 2f60374 | 2022-09-17 05:17:46 +0000 | [diff] [blame] | 59 | androidTestImplementation(libs.mockitoCore4, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 60 | androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker |
Ian Lake | 64c858b | 2019-09-27 14:34:08 -0700 | [diff] [blame] | 61 | androidTestImplementation("androidx.appcompat:appcompat:1.1.0") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 62 | androidTestImplementation(project(":camera:camera-testing")) |
Aurimas Liutikas | e26aaba | 2021-05-24 16:38:00 -0700 | [diff] [blame] | 63 | androidTestImplementation(libs.kotlinStdlib) |
| 64 | androidTestImplementation(libs.kotlinCoroutinesAndroid) |
Scott Nien | bdcefbc | 2021-04-23 17:23:06 +0800 | [diff] [blame] | 65 | androidTestImplementation("androidx.annotation:annotation-experimental:1.1.0") |
charcoalchen | 005c60b | 2020-09-02 14:16:59 +0800 | [diff] [blame] | 66 | androidTestImplementation(project(":internal-testutils-truth")) |
Trevor McGuire | 04438ba | 2020-12-14 23:40:02 +0000 | [diff] [blame] | 67 | androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1") |
Trevor McGuire | 3db0961 | 2020-12-07 01:18:55 -0800 | [diff] [blame] | 68 | androidTestImplementation("androidx.exifinterface:exifinterface:1.0.0") |
Scott Nien | ba3698b | 2021-08-10 11:17:54 +0800 | [diff] [blame] | 69 | androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0") |
WenHung_Teng | b72a4e0 | 2022-08-10 16:48:06 +0800 | [diff] [blame] | 70 | androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 71 | } |
| 72 | android { |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 73 | defaultConfig { |
Trevor McGuire | 4983db3 | 2021-09-21 17:21:19 -0700 | [diff] [blame] | 74 | multiDexEnabled = true |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 75 | } |
| 76 | |
Trevor McGuire | f2cec9e | 2020-02-18 21:56:00 -0800 | [diff] [blame] | 77 | buildTypes.all { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 78 | consumerProguardFiles "proguard-rules.pro" |
Trevor McGuire | f2cec9e | 2020-02-18 21:56:00 -0800 | [diff] [blame] | 79 | } |
| 80 | |
System Administrator | c4ab0a1 | 2022-04-13 12:05:20 -0700 | [diff] [blame] | 81 | lintOptions { |
| 82 | enable 'CameraXQuirksClassDetector' |
| 83 | } |
| 84 | |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 85 | // Use Robolectric 4.+ |
| 86 | testOptions.unitTests.includeAndroidResources = true |
Aurimas Liutikas | dcfa035 | 2022-03-14 16:05:33 -0700 | [diff] [blame] | 87 | namespace "androidx.camera.camera2" |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 88 | } |
David M. Chen | 389eda0 | 2019-04-01 16:32:06 -0700 | [diff] [blame] | 89 | |
| 90 | androidx { |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 91 | name = "Jetpack Camera Library Camera2 Implementation/Extensions" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 92 | publish = Publish.SNAPSHOT_AND_RELEASE |
Trevor McGuire | 8045819 | 2019-04-08 14:49:13 -0700 | [diff] [blame] | 93 | mavenGroup = LibraryGroups.CAMERA |
Trevor McGuire | 89ca96a | 2019-02-19 11:38:44 -0800 | [diff] [blame] | 94 | inceptionYear = "2019" |
| 95 | description = "Camera2 implementation and extensions for the Jetpack Camera Library, a " + |
| 96 | "library providing a consistent and reliable camera foundation that enables great " + |
| 97 | "camera driven experiences across all of Android." |
| 98 | } |