blob: 56e99b5c3fe409adf605fbcbeb543ca99511a434 [file] [log] [blame]
/*
* Copyright 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.
*/
/**
* This file was created using the `create_project.py` script located in the
* `<AndroidX root>/development/project-creator` directory.
*
* Please use that script when creating a new project, rather than copying an existing project and
* modifying its settings.
*/
import androidx.build.SoftwareType
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("org.jetbrains.kotlin.android")
}
dependencies {
api(libs.jspecify)
api("androidx.annotation:annotation:1.8.1")
api("androidx.lifecycle:lifecycle-livedata:2.1.0")
api(libs.guavaListenableFuture)
api("androidx.annotation:annotation-experimental:1.4.1")
api(libs.kotlinStdlib) // Added for annotation-experimental
api("androidx.core:core:1.1.0")
api("androidx.arch.core:core-common:2.1.0")
api("androidx.lifecycle:lifecycle-livedata-core:2.3.1")
implementation(libs.kotlinCoroutinesAndroid)
implementation("androidx.exifinterface:exifinterface:1.3.2")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
implementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
implementation("androidx.lifecycle:lifecycle-common:2.1.0")
implementation("androidx.tracing:tracing:1.2.0")
implementation(libs.autoValueAnnotations)
implementation(libs.kotlinCoroutinesCore)
androidTestImplementation(project(":camera:camera-camera2"))
compileOnly(project(":external:libyuv"))
annotationProcessor(libs.autoValue)
testImplementation(libs.kotlinCoroutinesAndroid)
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(libs.kotlinStdlib)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation(libs.mockitoCore4)
testImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
testImplementation(project(":internal-testutils-ktx"))
testImplementation(project(":internal-testutils-truth"))
testImplementation(project(":camera:camera-camera2"))
testImplementation(project(":camera:camera-testing"), {
exclude group: "androidx.camera", module: "camera-core"
})
testImplementation(project(":camera:camera-lifecycle"))
testImplementation(libs.guavaAndroid)
testImplementation(libs.kotlinCoroutinesCore)
testImplementation(project(":camera:camera-video"))
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.mockitoCore)
androidTestImplementation(libs.dexmakerMockito)
androidTestImplementation(project(":camera:camera-testing")) {
// Ensure camera-testing does not pull in androidx.test dependencies
exclude(group:"androidx.test")
}
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.kotlinCoroutinesAndroid)
androidTestImplementation("androidx.concurrent:concurrent-futures-ktx:1.1.0")
androidTestImplementation(project(":internal-testutils-truth"))
androidTestImplementation(libs.guavaAndroid)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.kotlinCoroutinesCore)
androidTestImplementation(libs.testMonitor)
}
android {
compileSdk = 35
defaultConfig {
externalNativeBuild {
def versionScript = file("src/main/cpp/jni.lds").getAbsolutePath()
cmake {
cppFlags "-std=c++17", "-O3", "-flto", "-fPIC", "-fno-exceptions", "-fno-rtti",
"-fomit-frame-pointer", "-fdata-sections", "-ffunction-sections"
arguments "-DCMAKE_VERBOSE_MAKEFILE=ON",
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--gc-sections " +
"-Wl,--version-script=${versionScript} " +
"-Wl,--undefined-version"
}
}
}
buildTypes.configureEach {
consumerProguardFiles("proguard-rules.pro")
}
buildFeatures.prefab = true
externalNativeBuild {
cmake {
version = libs.versions.cmake.get()
path "src/main/cpp/CMakeLists.txt"
}
}
lint {
enable.add("CameraXQuirksClassDetector")
}
packagingOptions {
pickFirst "META-INF/support.camera_camera-core.version"
}
namespace = "androidx.camera.core"
}
tasks.withType(Test).configureEach { test ->
test.maxParallelForks = 2
}
androidx {
name = "Camera Core"
type = SoftwareType.PUBLISHED_LIBRARY
samples(project(":camera:camera-core:camera-core-samples"))
inceptionYear = "2019"
description = "Core components for the Jetpack Camera Library, a library providing a " +
"consistent and reliable camera foundation that enables great camera driven " +
"experiences across all of Android."
extraLicense {
name = "BSD License"
url = "https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/README.chromium"
}
enableRobolectric()
}