/*
 * Copyright 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

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

dependencies {
    api(libs.jspecify)
    api(libs.kotlinStdlib)
    api(libs.kotlinCoroutinesCore)
    api("androidx.arch.core:core-runtime:2.2.0")
    api(project(":lifecycle:lifecycle-livedata-core"))
    api(project(":lifecycle:lifecycle-livedata-core-ktx"))

    implementation("androidx.arch.core:core-common:2.2.0")

    testImplementation(project(":lifecycle:lifecycle-runtime-testing"))
    testImplementation("androidx.arch.core:core-testing:2.2.0")
    testImplementation(libs.kotlinCoroutinesTest)
    testImplementation(libs.junit)
    testImplementation(libs.mockitoCore4)
    testImplementation(libs.truth)

    androidTestImplementation(libs.testExtJunit)
    androidTestImplementation(libs.testCore)
    androidTestImplementation(libs.testRules)
    androidTestImplementation(libs.testRunner)
    androidTestImplementation(libs.truth)
    androidTestImplementation(libs.kotlinCoroutinesTest)
    androidTestImplementation(libs.kotlinCoroutinesAndroid)
}

androidx {
    name = "Lifecycle LiveData"
    type = LibraryType.PUBLISHED_LIBRARY
    inceptionYear = "2017"
    description = "Android Lifecycle LiveData"
}

android {
    namespace = "androidx.lifecycle.livedata"
}
