| /* |
| * 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") |
| } |
| |
| android { |
| buildFeatures { |
| aidl = true |
| } |
| buildTypes.all { |
| consumerProguardFiles "proguard-rules.pro" |
| } |
| 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 { |
| implementation("androidx.core:core:1.6.0") |
| ksp("androidx.room:room-compiler:2.4.0-rc01") |
| implementation("androidx.room:room-runtime:2.4.0-rc01") |
| androidTestImplementation("androidx.room:room-testing:2.4.0-rc01") |
| implementation(projectOrArtifact(":sqlite:sqlite")) |
| implementation(projectOrArtifact(":sqlite:sqlite-framework")) |
| api("androidx.annotation:annotation-experimental:1.0.0") |
| api(libs.guavaListenableFuture) |
| api("androidx.lifecycle:lifecycle-livedata:2.1.0") |
| api("androidx.startup:startup-runtime:1.0.0") |
| implementation("androidx.core:core:1.1.0") |
| implementation("androidx.lifecycle:lifecycle-service:2.1.0") |
| api(libs.kotlinStdlib) |
| androidTestImplementation(libs.multidex) |
| androidTestImplementation(libs.truth) |
| androidTestImplementation(libs.testExtJunit) |
| androidTestImplementation(libs.testCore) |
| androidTestImplementation("androidx.arch.core:core-testing:2.1.0") |
| androidTestImplementation(projectOrArtifact(":lifecycle:lifecycle-runtime-testing")) |
| 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) |
| 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 = "Android WorkManager Runtime" |
| publish = Publish.SNAPSHOT_AND_RELEASE |
| mavenGroup = LibraryGroups.WORK |
| inceptionYear = "2018" |
| description = "Android WorkManager runtime library" |
| failOnDeprecationWarnings = false |
| } |