/*
 * Copyright 2019 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

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

dependencies {
    api("androidx.annotation:annotation:1.1.0")
    implementation("androidx.core:core:1.1.0")
    implementation(libs.autoValueAnnotations)
    annotationProcessor(libs.autoValue)
    api(libs.guavaListenableFuture)
    implementation("androidx.concurrent:concurrent-futures:1.0.0")

    implementation(project(":ads:ads-identifier-common"))

    androidTestImplementation(project(":ads:ads-identifier-testing"))
    androidTestImplementation(libs.junit)
    androidTestImplementation(libs.truth)
    androidTestImplementation(libs.testExtJunit)
    androidTestImplementation(libs.testCore)
    androidTestImplementation(libs.testRunner)
    androidTestImplementation(libs.testRules)
    androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy)
}

androidx {
    name = "AndroidX Ads Identifier"
    publish = Publish.SNAPSHOT_AND_RELEASE
    mavenVersion = LibraryVersions.ADS_IDENTIFIER
    mavenGroup = LibraryGroups.ADS
    inceptionYear = "2019"
    description = "AndroidX Ads Identifier"
}

android {
    namespace "androidx.ads.identifier"
}
