blob: 4dda00a7a52878948859f8db474bba40eb001021 [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.
*/
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-view"))
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")
implementation("androidx.lifecycle:lifecycle-service:2.2.0")
// MLKit library: Barcode scanner
implementation(libs.mlkitBarcode) {
exclude group: "androidx.fragment"
exclude group: "androidx.core"
exclude group: "androidx.exifinterface"
}
// camera-testing added as 'implementation' dependency to include camera-testing activity in APK
implementation(project(":camera:camera-testing")) {
// Ensure camera-testing does not pull in androidx.test dependencies
exclude(group:"androidx.test")
}
// 3P library
debugImplementation(libs.leakcanary)
// Testing resource dependency for manifest
debugImplementation(project(":camera:camera-testing")) {
// Ensure camera-testing does not pull in androidx.test dependencies
exclude(group:"androidx.test")
}
debugImplementation(libs.testCore)
// explicitly add runner here to force consistency with androidTestImplementation
debugImplementation(libs.testRunner)
// Align dependencies in debugRuntimeClasspath and debugAndroidTestRuntimeClasspath.
androidTestImplementation("androidx.annotation:annotation-experimental:1.4.0")
// Testing framework
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.espressoIdlingResource)
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinCoroutinesAndroid)
androidTestImplementation(libs.leakcanary)
androidTestImplementation(libs.leakcanaryInstrumentation)
androidTestImplementation(libs.truth)
androidTestImplementation(project(":camera:camera-camera2"))
androidTestImplementation(project(":camera:camera-testing")) {
// Ensure camera-testing does not pull in androidx.test dependencies
exclude(group:"androidx.test")
}
androidTestImplementation(project(":concurrent:concurrent-futures"))
androidTestImplementation(project(":concurrent:concurrent-futures-ktx"))
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":internal-testutils-truth"))
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.3.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
androidTestImplementation("org.jetbrains.kotlinx:atomicfu:0.13.1")
testImplementation(libs.kotlinStdlib)
testImplementation(libs.kotlinCoroutinesAndroid)
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
testImplementation(libs.truth)
testImplementation(project(":internal-testutils-ktx"))
}