blob: 0fe8c7c2b5e2b00072051276ca8a3f153d8878ab [file] [log] [blame]
leo huange9b95852020-06-03 17:08:55 +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
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070017
leo huange9b95852020-06-03 17:08:55 +080018import androidx.build.LibraryGroups
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070019import androidx.build.LibraryVersions
leo huange9b95852020-06-03 17:08:55 +080020import androidx.build.Publish
TY Chang84e89612021-07-09 15:10:26 +080021import androidx.build.RunApiTasks
leo huange9b95852020-06-03 17:08:55 +080022
23plugins {
24 id("AndroidXPlugin")
25 id("com.android.library")
AL Hoe8c79302020-11-03 15:35:11 +080026 id("kotlin-android")
leo huange9b95852020-06-03 17:08:55 +080027}
28
29dependencies {
leo huang39b73142021-05-18 15:14:24 +080030 api("androidx.annotation:annotation:1.2.0")
leo huange9b95852020-06-03 17:08:55 +080031 api(project(":camera:camera-core"))
AL Hoe8c79302020-11-03 15:35:11 +080032 implementation("androidx.core:core:1.1.0")
33 implementation("androidx.concurrent:concurrent-futures:1.0.0")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070034 implementation(libs.autoValueAnnotations)
AL Hoe8c79302020-11-03 15:35:11 +080035
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070036 annotationProcessor(libs.autoValue)
AL Hoe8c79302020-11-03 15:35:11 +080037
leo huang433b9dc2021-03-01 14:07:16 +080038 // TODO(leohuang): We need this for assertThrows. Point back to the AndroidX shared version if
39 // it is ever upgraded.
40 testImplementation("junit:junit:4.13")
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070041 testImplementation(libs.kotlinStdlib)
42 testImplementation(libs.testCore)
43 testImplementation(libs.testRunner)
44 testImplementation(libs.junit)
45 testImplementation(libs.truth)
46 testImplementation(libs.robolectric)
47 testImplementation(libs.mockitoCore)
Trevor McGuire1c6d8be2021-11-12 21:22:42 -080048 testImplementation("androidx.core:core-ktx:1.1.0")
Jim Sproch9e38b4f2021-01-06 14:21:06 -080049 testImplementation(project(":camera:camera-testing"), {
AL Hoe8c79302020-11-03 15:35:11 +080050 exclude group: "androidx.camera", module: "camera-core"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080051 })
leo huang2059c472020-10-22 22:31:50 +080052
Trevor McGuire1f614a62021-09-23 10:53:05 -070053 androidTestImplementation(libs.multidex)
Jim Sproch9e38b4f2021-01-06 14:21:06 -080054 androidTestImplementation(project(path: ":camera:camera-camera2"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070055 androidTestImplementation(libs.testExtJunit)
56 androidTestImplementation(libs.testCore)
57 androidTestImplementation(libs.testRunner)
58 androidTestImplementation(libs.testRules)
59 androidTestImplementation(libs.truth)
60 androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
61 androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
Wegin Leecb60086a2021-07-23 17:26:16 +080062 androidTestImplementation(project(":camera:camera-lifecycle"))
leo huang2059c472020-10-22 22:31:50 +080063 androidTestImplementation(project(":camera:camera-testing"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070064 androidTestImplementation(libs.kotlinStdlib)
65 androidTestImplementation(libs.kotlinCoroutinesAndroid)
leo huang2059c472020-10-22 22:31:50 +080066 androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
67 androidTestImplementation(project(":internal-testutils-truth"))
Aurimas Liutikase26aaba2021-05-24 16:38:00 -070068 androidTestImplementation libs.mockitoKotlin, {
AL Ho22531302021-01-19 10:22:41 +080069 exclude group: 'org.mockito' // to keep control on the mockito version
70 }
leo huange9b95852020-06-03 17:08:55 +080071}
72
73android {
74 defaultConfig {
Trevor McGuire1f614a62021-09-23 10:53:05 -070075 multiDexEnabled = true
leo huange9b95852020-06-03 17:08:55 +080076 }
77
78 // Use Robolectric 4.+
79 testOptions.unitTests.includeAndroidResources = true
Steven Schäferb7520772021-05-25 17:48:51 +020080
81 kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
leo huange9b95852020-06-03 17:08:55 +080082}
83
84androidx {
85 name = "Jetpack Camera Video Library"
Julie Wucc2ce712021-09-29 08:58:13 +000086 publish = Publish.SNAPSHOT_AND_RELEASE
TY Chang84e89612021-07-09 15:10:26 +080087 runApiTasks = new RunApiTasks.Yes("Need to track API surface before moving to publish")
leo huange9b95852020-06-03 17:08:55 +080088 mavenGroup = LibraryGroups.CAMERA
89 inceptionYear = "2020"
90 description = "Video components for the Jetpack Camera Library, a library providing a " +
91 "consistent and reliable camera foundation that enables great camera driven " +
92 "experiences across all of Android."
93}