1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import static androidx.build.dependencies.DependenciesKt.*
18import androidx.build.LibraryGroups
19import androidx.build.LibraryVersions
20import androidx.build.SupportLibraryExtension
21
22plugins {
23    id("SupportAndroidLibraryPlugin")
24}
25
26android {
27    buildTypes.all {
28        consumerProguardFiles 'proguard-rules.pro'
29    }
30}
31
32dependencies {
33    api(project(":room:room-common"))
34    api(project(":sqlite:sqlite-framework"))
35    api(project(":sqlite:sqlite"))
36    api(project(":arch:core-runtime"))
37    compileOnly project(":paging:paging-common")
38    compileOnly project(":lifecycle:lifecycle-runtime")
39    compileOnly project(":lifecycle:lifecycle-extensions")
40    api(SUPPORT_CORE_UTILS, libs.support_exclude_config)
41
42    testImplementation(project(":arch:core-testing"))
43    testImplementation(JUNIT)
44    testImplementation(MOCKITO_CORE)
45
46    androidTestImplementation(JUNIT)
47    androidTestImplementation(TEST_RUNNER)
48    androidTestImplementation(ESPRESSO_CORE)
49}
50
51// Used by testCompile in room-compiler
52android.libraryVariants.all { variant ->
53    def name = variant.buildType.name
54    def suffix = name.capitalize()
55    project.tasks.create(name: "jar${suffix}", type: Jar){
56        dependsOn variant.javaCompile
57        from variant.javaCompile.destinationDir
58        destinationDir new File(project.buildDir, "libJar")
59    }
60}
61
62supportLibrary {
63    name = "Android Room-Runtime"
64    publish = true
65    mavenVersion = LibraryVersions.ROOM
66    mavenGroup = LibraryGroups.ROOM
67    inceptionYear = "2017"
68    description = "Android Room-Runtime"
69    url = SupportLibraryExtension.ARCHITECTURE_URL
70}