/*
 * Copyright (C) 2018 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 static androidx.build.dependencies.DependenciesKt.*
import androidx.build.LibraryGroups
import androidx.build.LibraryVersions
import androidx.build.AndroidXExtension
import androidx.build.Publish

plugins {
    id("AndroidXPlugin")
    id("com.android.library")
}

dependencies {
    api(project(":room:room-common"))
    api(project(":room:room-runtime")) {
        exclude group: 'com.google.guava', module: 'listenablefuture'
    }
    implementation(ARCH_CORE_RUNTIME)

    api(SUPPORT_ANNOTATIONS, libs.support_exclude_config)
    api(GUAVA_ANDROID)
}

androidx {
    name = "Android Room Guava"
    publish = Publish.SNAPSHOT_AND_RELEASE
    mavenVersion = LibraryVersions.ROOM
    mavenGroup = LibraryGroups.ROOM
    inceptionYear = "2018"
    description = "Android Room Guava"
    url = AndroidXExtension.ARCHITECTURE_URL
}