blob: ad76c8aae03f1771992dee13437aa5ec5cbf692b [file] [log] [blame]
/*
* Copyright (C) 2017 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 static androidx.inspection.gradle.InspectionPluginKt.packageInspector
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("kotlin-android")
id("com.google.devtools.ksp")
id("androidx.stableaidl")
}
android {
buildFeatures {
aidl = true
}
buildTypes.all {
consumerProguardFiles "proguard-rules.pro"
stableAidl {
version 1
}
}
defaultConfig {
multiDexEnabled = true
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"room.incremental" : "true",
"room.expandProjection": "true",
"room.schemaLocation" : "$projectDir/src/schemas".toString()
]
}
}
}
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/src/schemas".toString())
}
namespace "androidx.work"
}
dependencies {
ksp("androidx.room:room-compiler:2.6.1")
implementation("androidx.core:core:1.12.0")
implementation("androidx.room:room-ktx:2.6.1")
implementation("androidx.concurrent:concurrent-futures:1.1.0")
api("androidx.annotation:annotation-experimental:1.0.0")
api(libs.guavaListenableFuture)
api("androidx.lifecycle:lifecycle-livedata:2.6.2")
api("androidx.startup:startup-runtime:1.1.1")
implementation("androidx.lifecycle:lifecycle-service:2.6.2")
api(libs.kotlinStdlib)
api(libs.kotlinCoroutinesAndroid)
androidTestImplementation(libs.multidex)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testCore)
androidTestImplementation("androidx.arch.core:core-testing:2.2.0")
androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing"))
androidTestImplementation("androidx.room:room-testing:2.6.1")
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.espressoCore)
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has its own MockMaker
androidTestImplementation(project(":internal-testutils-runtime"))
testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation(libs.robolectric)
testImplementation(libs.testCoreKtx)
lintPublish(project(":work:work-runtime-lint"))
}
packageInspector(project, ":work:work-inspection")
// KSP does not support argument per flavor so we set it to global instead.
ksp {
arg("room.schemaLocation","$projectDir/src/schemas".toString())
}
androidx {
name = "WorkManager Runtime"
publish = Publish.SNAPSHOT_AND_RELEASE
inceptionYear = "2018"
description = "Android WorkManager runtime library"
failOnDeprecationWarnings = false
metalavaK2UastEnabled = true
}