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

ext {
    fontDir = project(":noto-emoji-compat-font").projectDir
}

android {
    sourceSets {
        main.assets.srcDirs new File(fontDir, "font").getAbsolutePath()
    }
    namespace = "androidx.emoji.bundled"
}

dependencies {
    api(libs.jspecify)
    api(project(":emoji:emoji"))
}

androidx {
    name = "Emoji Bundled"
    type = LibraryType.PUBLISHED_LIBRARY
    mavenVersion = LibraryVersions.EMOJI
    inceptionYear = "2017"
    description = "Library bundled with assets to enable emoji compatibility in Kitkat and newer devices to avoid the empty emoji characters."

    extraLicense {
        name = "SIL Open Font License, Version 1.1"
        url = "http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web"
    }

    extraLicense {
        name = "Unicode, Inc. License"
        url = "http://www.unicode.org/copyright.html#License"
    }
}
