/**
 * This file was created using the `create_project.py` script located in the
 * `<AndroidX root>/development/project-creator` directory.
 *
 * Please use that script when creating a new project, rather than copying an existing project and
 * modifying its settings.
 */
import androidx.build.LibraryType

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

dependencies {
    api(libs.jspecify)
    api("androidx.annotation:annotation:1.8.1")
    api("com.google.android.material:material:1.0.0")
    api("androidx.viewpager:viewpager:1.0.0")

    // To avoid manifest merger warnings due to duplicate package names
    // It can be removed if material library is updated to a newer version
    implementation("androidx.vectordrawable:vectordrawable-animated:1.1.0")

    androidTestImplementation(libs.testExtJunit)
    androidTestImplementation(libs.testCore)
    androidTestImplementation(libs.testRunner)
    androidTestImplementation(libs.testRules)
    androidTestImplementation(libs.espressoCore)
    androidTestImplementation(libs.mockitoCore)
    androidTestImplementation(libs.dexmakerMockito)
    androidTestImplementation(project(":internal-testutils-espresso"))
    androidTestImplementation(project(":internal-testutils-runtime"))
    androidTestImplementation(project(":internal-testutils-common"))
    androidTestImplementation(project(":leanback:leanback"))
    androidTestImplementation("androidx.appcompat:appcompat:1.0.0")
    androidTestImplementation(libs.constraintLayout)
}

android {
    compileSdk = 35
    namespace = "androidx.leanback.tab"
}

androidx {
    name = "Leanback Tab"
    type = LibraryType.PUBLISHED_LIBRARY
    mavenVersion = LibraryVersions.LEANBACK_TAB
    inceptionYear = "2020"
    description = "This library adds top tab navigation component to be used in TV"
    // TODO: b/326456246
    optOutJSpecify = true
}
