blob: 0344722278cf3a85803eae2b807f7d4845b084eb [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 org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("AndroidXPlugin")
id("com.android.application")
id("kotlin-android")
}
android {
defaultConfig {
applicationId "androidx.camera.integration.core"
minSdkVersion 21
versionCode 1
multiDexEnabled true
testInstrumentationRunnerArgument "listener", "leakcanary.FailAnnotatedTestOnLeakRunListener"
externalNativeBuild {
cmake {
cppFlags "-std=c++17"
arguments "-DCMAKE_VERBOSE_MAKEFILE=ON"
}
}
}
buildTypes {
debug {
pseudoLocalesEnabled true
}
release {
minifyEnabled true
shrinkResources true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.22.1"
}
}
}
dependencies {
// Internal library
implementation(project(":camera:camera-camera2"))
implementation(project(":camera:camera-camera2-pipe-integration"))
implementation(project(":camera:camera-core"))
implementation(project(":camera:camera-lifecycle"))
implementation(project(":camera:camera-video"))
// Needed because AGP enforces same version between main and androidTest classpaths
implementation(project(":concurrent:concurrent-futures"))
// Android Support Library
api(libs.constraintLayout)
implementation(libs.guavaAndroid)
implementation(libs.espressoIdlingResource)
implementation("androidx.appcompat:appcompat:1.3.0")
// MLKit library: Barcode scanner
implementation(libs.mlkitBarcode, excludes.mlkit)
// 3P library
debugImplementation(libs.leakcanary)
// Testing resource dependency for manifest
debugImplementation(project(":camera:camera-testing"))
// Testing framework
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.espressoCore)
androidTestImplementation(libs.espressoIdlingResource)
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinCoroutinesAndroid)
androidTestImplementation(libs.leakcanary)
androidTestImplementation(libs.leakcanaryInstrumentation)
androidTestImplementation(libs.truth)
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(project(":concurrent:concurrent-futures"))
androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
testImplementation(libs.junit)
testImplementation(libs.truth)
}
// Allow usage of Kotlin's @OptIn.
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
}
}