blob: 3b85cb899e24eb6725733027d81da05db2a904fd [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
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 libs.versions.cmake.get()
}
}
namespace "androidx.camera.integration.core"
}
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-mlkit-vision"))
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 += ["-opt-in=kotlin.RequiresOptIn"]
}
}