blob: 076e5af0b6e6dde6963895fc8849a0b07dd5c11f [file] [log] [blame]
/*
* Copyright 2020 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.LibraryType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("kotlin-android")
}
android {
defaultConfig {
multiDexEnabled = true
}
buildTypes.configureEach {
consumerProguardFiles "proguard-rules.pro"
}
sourceSets {
String testUtilDir = 'src/testUtil/java'
test {
java.srcDir testUtilDir
}
androidTest {
java.srcDir testUtilDir
}
}
namespace "androidx.window"
}
dependencies {
api(libs.kotlinStdlib)
api(libs.kotlinCoroutinesAndroid)
implementation("androidx.annotation:annotation:1.3.0")
implementation("androidx.collection:collection:1.1.0")
implementation("androidx.core:core:1.8.0")
def extensions_core_version = "androidx.window.extensions.core:core:1.0.0"
def extensions_version = "androidx.window.extensions:extensions:1.2.0"
// A compile only dependency on extnensions.core so that other libraries do not expose it
// transitively.
compileOnly(extensions_core_version)
// A compile only dependency on extnensions.core so that other libraries do not expose it
// transitively. The testCompile is added because tests are not getting the dependency
// transitively.
testCompileOnly(extensions_core_version)
// A compile only dependency on extnensions.core so that other libraries do not expose it
// transitively. The androidTestCompile is added because tests are not getting the dependency
// transitively.
androidTestCompileOnly(extensions_core_version)
compileOnly(project(":window:sidecar:sidecar"))
compileOnly(extensions_version)
testImplementation(libs.testCore)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation(libs.robolectric)
testImplementation(libs.mockitoCore4)
testImplementation(libs.mockitoKotlin4)
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(extensions_version)
testImplementation(compileOnly(project(":window:sidecar:sidecar")))
testImplementation(compileOnly(extensions_version))
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.kotlinTestJunit)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy)
androidTestImplementation(libs.mockitoKotlin, excludes.bytebuddy)
androidTestImplementation(libs.kotlinCoroutinesTest)
androidTestImplementation(libs.multidex)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.junit) // Needed for Assert.assertThrows
androidTestImplementation(extensions_core_version)
androidTestImplementation(compileOnly(project(":window:sidecar:sidecar")))
androidTestImplementation(compileOnly(extensions_version))
}
androidx {
name = "WindowManager"
type = LibraryType.PUBLISHED_LIBRARY
inceptionYear = "2020"
description = "WindowManager Jetpack library. Currently only provides additional " +
"functionality on foldable devices."
metalavaK2UastEnabled = true
// Suppressing deprecation warnings, since there is a need to maintain compatibility with old
// Sidecar interface.
failOnDeprecationWarnings = false
legacyDisableKotlinStrictApiMode = true
samples(project(":window:window-samples"))
}