/**
 * 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.BundleInsideHelper
import androidx.build.LibraryType

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

BundleInsideHelper.forInsideAar(
    project,
    [
            new BundleInsideHelper.Relocation("com.google.flatbuffers",
                    "androidx.emoji2.text.flatbuffer"),
            new BundleInsideHelper.Relocation("androidx.text.emoji.flatbuffer",
                    "androidx.emoji2.text.flatbuffer")
    ],
    /* dropResourcesWithSuffix = */ null
)

dependencies {
    api(libs.jspecify)
    bundleInside(project(":noto-emoji-compat-flatbuffers"))

    api("androidx.core:core:1.3.0")
    api("androidx.startup:startup-runtime:1.0.0")
    implementation("androidx.collection:collection:1.4.2")
    implementation("androidx.annotation:annotation:1.8.1")
    implementation("androidx.lifecycle:lifecycle-process:2.4.1")

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

androidx {
    name = "Emoji2"
    type = LibraryType.PUBLISHED_LIBRARY
    inceptionYear = "2017"
    description = "Core library to enable emoji compatibility in Kitkat and newer devices to avoid the empty emoji characters."
}

android {
    namespace = "androidx.emoji2"
}
