blob: 689feab4b5e467d5c2811137cdd11b19d8bb158c [file] [log] [blame]
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import static androidx.build.dependencies.DependenciesKt.*
plugins {
id("AndroidXPlugin")
id("com.android.application")
id("kotlin-android")
}
apply(from: "../../camera-view/dependencies.gradle")
android {
defaultConfig {
applicationId "androidx.camera.integration.view"
minSdkVersion 21
versionCode 1
multiDexEnabled true
}
sourceSets {
main.manifest.srcFile "src/main/AndroidManifest.xml"
main.java.srcDirs = ["src/main/java"]
main.java.excludes = ["**/build/**"]
main.java.includes = ["**/*.java"]
main.res.srcDirs = ["src/main/res"]
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro")
}
}
}
dependencies {
// Internal library
implementation("androidx.camera:camera-camera2:${VIEW_ATOMIC_GROUP_PINNED_VER}")
implementation("androidx.camera:camera-lifecycle:${VIEW_ATOMIC_GROUP_PINNED_VER}")
implementation(project(":lifecycle:lifecycle-runtime"))
implementation(project(":camera:camera-view"))
implementation(GUAVA_ANDROID)
implementation("androidx.exifinterface:exifinterface:1.3.2")
// Lifecycle and LiveData
implementation("androidx.lifecycle:lifecycle-livedata:2.2.0")
// Android Support Library
implementation("androidx.appcompat:appcompat:1.1.0")
// Testing framework
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_UIAUTOMATOR)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(project(":lifecycle:lifecycle-runtime-testing"))
androidTestImplementation(project(":lifecycle:lifecycle-runtime"))
androidTestImplementation("androidx.lifecycle:lifecycle-livedata-ktx:2.2.0")
androidTestImplementation(TRUTH)
debugImplementation(ANDROIDX_TEST_CORE)
debugImplementation("androidx.fragment:fragment-testing:1.2.3")
// camera-testing added as 'implementation' dependency to include camera-testing activity in APK
debugImplementation(project(":camera:camera-testing")) {
// Ensure camera-testing does not pull in camera-core project dependency which will
// override pinned dependency.
exclude(group:"androidx.camera", module:"camera-core")
}
}