/**
 * 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")
    id("kotlin-android")
}

dependencies {
    api(libs.jspecify)
    api("androidx.annotation:annotation:1.8.1")
    api("androidx.core:core:1.6.0")
    api("androidx.versionedparcelable:versionedparcelable:1.1.1")

    testImplementation(libs.kotlinStdlib)
    testImplementation(libs.testCore)
    testImplementation(libs.testRunner)
    testImplementation(libs.robolectric)

    implementation "androidx.core:core-ktx:1.6.0"

    annotationProcessor(project(":versionedparcelable:versionedparcelable-compiler"))
}

android {
    defaultConfig {
        minSdk = 25
    }

    // Use Robolectric 4.+
    testOptions.unitTests.includeAndroidResources = true
    namespace = "androidx.wear.ongoing"
}

androidx {
    name = "Android Wear Ongoing"
    type = LibraryType.PUBLISHED_LIBRARY
    mavenVersion = LibraryVersions.WEAR_ONGOING
    inceptionYear = "2021"
    description = "Android Wear Ongoing Activities"
    legacyDisableKotlinStrictApiMode = true
}
