blob: 067e991b729fcc23ba00d0f773af5bf2045b67b3 [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.
*/
import static androidx.build.dependencies.DependenciesKt.*
import androidx.build.LibraryVersions
import androidx.build.LibraryGroups
import androidx.build.Publish
plugins {
id("AndroidXPlugin")
id("com.android.library")
}
dependencies {
api(project(":camera:camera-core"))
implementation(project(":camera:camera-camera2"))
implementation("androidx.core:core:1.0.0")
implementation("androidx.concurrent:concurrent-futures:1.0.0")
implementation(GUAVA_LISTENABLE_FUTURE)
implementation(AUTO_VALUE_ANNOTATIONS)
annotationProcessor(AUTO_VALUE)
compileOnly(project(":camera:camera-extensions-stub"))
testImplementation(JUNIT)
testImplementation(MOCKITO_CORE)
testImplementation(ROBOLECTRIC)
testImplementation project(":camera:camera-testing")
testImplementation(project(":camera:camera-extensions-stub"))
// To use the extensions-stub for testing directly.
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(TRUTH)
androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(project(":camera:integration-tests:camera-testlib-extensions"))
// To use the testlib to have the implementation of the extensions-stub interface.
}
android {
defaultConfig {
minSdkVersion 21
buildConfigField "String", "CAMERA_VERSION", "\"1.1.0\""
}
// Use Robolectric 4.+
testOptions.unitTests.includeAndroidResources = true
}
// Enable generating BuildConfig.java since support library default disable it.
// Need to track on https://issuetracker.google.com/issues/72050365
android.libraryVariants.all { variant ->
variant.generateBuildConfigProvider.configure {
it.enabled = true
}
}
androidx {
name = "Jetpack Camera Library OEM Extensions"
publish = Publish.SNAPSHOT_AND_RELEASE
mavenVersion = LibraryVersions.CAMERA_EXTENSIONS
mavenGroup = LibraryGroups.CAMERA
inceptionYear = "2019"
description = "OEM Extensions for the Jetpack Camera Library, a library providing interfaces" +
" to integrate with OEM specific camera features."
}