/**
 * 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)
    implementation(project(":emoji2:emoji2"))

    api("androidx.core:core:1.3.0")
    implementation("androidx.collection:collection:1.4.2")

    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-runtime"))
}

android {
    namespace = "androidx.emoji2.viewsintegration"
}

androidx {
    name = "Emoji2 Views Helper"
    type = LibraryType.PUBLISHED_LIBRARY
    inceptionYear = "2017"
    description = "Provide helper classes for Emoji2 views."
}
