blob: e4378aad1cdb66900bf9d802feacfc2c4711065d [file] [log] [blame]
import androidx.build.Publish
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
}
dependencies {
api("androidx.annotation:annotation:1.3.0")
api(projectOrArtifact(":core:core"))
// Required to make activity 1.5.0-rc01 dependencies resolve.
implementation("androidx.core:core-ktx:1.8.0")
implementation(libs.kotlinStdlib)
implementation("androidx.emoji2:emoji2:1.3.0")
implementation("androidx.emoji2:emoji2-views-helper:1.2.0")
implementation("androidx.collection:collection:1.0.0")
api("androidx.cursoradapter:cursoradapter:1.0.0")
api("androidx.activity:activity:1.7.0")
api("androidx.fragment:fragment:1.5.4")
api(project(":appcompat:appcompat-resources"))
api("androidx.drawerlayout:drawerlayout:1.0.0")
implementation("androidx.lifecycle:lifecycle-runtime:2.6.1")
implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
implementation("androidx.profileinstaller:profileinstaller:1.3.0")
implementation("androidx.resourceinspection:resourceinspection-annotation:1.0.1")
api("androidx.savedstate:savedstate:1.2.1")
kapt("androidx.resourceinspection:resourceinspection-processor:1.0.1")
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.espressoCore, excludes.espresso)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation("androidx.lifecycle:lifecycle-viewmodel:2.6.1")
androidTestImplementation("androidx.lifecycle:lifecycle-runtime-testing:2.6.1", {
// Needed to ensure that the same version of lifecycle-runtime-ktx
// is pulled into main and androidTest configurations. Otherwise,
// potentially leads to confusing errors about resolution
// ambiguity, especially from playground build which replaces
// project dependency with snapshot artifacts.
exclude group: "androidx.lifecycle", module: "lifecycle-runtime-ktx"
})
androidTestImplementation(project(":internal-testutils-runtime"))
androidTestImplementation(project(":internal-testutils-appcompat"), {
exclude group: "androidx.appcompat", module: "appcompat"
exclude group: "androidx.core", module: "core"
})
androidTestImplementation(libs.multidex)
testImplementation(libs.kotlinStdlib)
testImplementation(libs.testCore)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
lintPublish project(":appcompat:appcompat-lint")
}
android {
defaultConfig {
// This disables the builds tools automatic vector -> PNG generation
generatedDensities = []
multiDexEnabled = true
}
sourceSets {
main.res.srcDirs += "src/main/res-public"
}
aaptOptions {
additionalParameters "--no-version-vectors"
noCompress "ttf"
}
testOptions {
animationsDisabled = true
unitTests {
includeAndroidResources = true
}
}
buildTypes.all {
consumerProguardFiles("proguard-rules.pro")
}
useLibrary "android.test.runner"
useLibrary "android.test.base"
useLibrary "android.test.mock"
namespace "androidx.appcompat"
testNamespace "androidx.appcompat.test"
}
androidx {
name = "AppCompat"
publish = Publish.SNAPSHOT_AND_RELEASE
inceptionYear = "2011"
description = "Provides backwards-compatible implementations of UI-related Android SDK " +
"functionality, including dark mode and Material theming."
failOnDeprecationWarnings = false
metalavaK2UastEnabled = true
}