/**
 * 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(libs.autoValueAnnotations)
    testImplementation(libs.testCore)
    testImplementation(libs.testRunner)
    annotationProcessor(libs.autoValue)
    testImplementation(libs.junit)
    testImplementation(libs.truth)
    testImplementation(libs.robolectric)
}
android {
    testOptions.unitTests.includeAndroidResources = true
    namespace = "androidx.enterprise.feedback"
}

androidx {
    name = "Enterprise Feedback"
    type = LibraryType.PUBLISHED_LIBRARY
    inceptionYear = "2019"
    description = "A channel to enable communication between an app and an EMM (enterprise " +
            "mobility management)"
}
