blob: f045acf203a893e638750b8062d5a0c1d6b6609d [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.
*/
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("kotlin-android")
}
android {
defaultConfig {
multiDexEnabled = true
}
buildTypes.all {
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.2.0")
implementation("androidx.collection:collection:1.1.0")
implementation("androidx.core:core:1.8.0")
compileOnly(project(":window:sidecar:sidecar"))
compileOnly("androidx.window.extensions:extensions:1.1.0-alpha02")
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(compileOnly(project(":window:sidecar:sidecar")))
testImplementation(compileOnly("androidx.window.extensions:extensions:1.1.0-alpha02"))
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(compileOnly(project(":window:sidecar:sidecar")))
androidTestImplementation(compileOnly("androidx.window.extensions:extensions:1.1.0-alpha02"))
samples(project(":window:window-samples"))
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += ["-Xjvm-default=all"]
}
}
androidx {
name = "Jetpack WindowManager Library"
publish = Publish.SNAPSHOT_AND_RELEASE
mavenGroup = LibraryGroups.WINDOW
inceptionYear = "2020"
description = "WindowManager Jetpack library. Currently only provides additional " +
"functionality on foldable devices."
// Suppressing deprecation warnings, since there is a need to maintain compatibility with old
// Sidecar interface.
failOnDeprecationWarnings = false
}