/**
 * 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.
 */
plugins {
    id("AndroidXPlugin")
    id("com.android.application")
    id("kotlin-android")
}

dependencies {
    api(libs.jspecify)
    api(libs.kotlinStdlib)

    implementation(project(":appcompat:appcompat"))
    implementation(project(":appcompat:appcompat-resources"))
    implementation(project(":cardview:cardview"))
    implementation(project(":core:core"))
    implementation(project(":drawerlayout:drawerlayout"))
    implementation(project(":gridlayout:gridlayout"))
    implementation(project(":palette:palette"))
    implementation(project(":recyclerview:recyclerview"))
    implementation(project(":recyclerview:recyclerview-selection"))
    implementation(libs.material)
    implementation(libs.androidx.annotation)
    implementation("androidx.collection:collection:1.4.2")
    implementation("androidx.loader:loader:1.0.0")
    implementation("androidx.cursoradapter:cursoradapter:1.0.0")
    implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.2")
    implementation("androidx.fragment:fragment:1.5.4")
    implementation("androidx.coordinatorlayout:coordinatorlayout:1.1.0")
    implementation("androidx.viewpager:viewpager:1.0.0")
}

android {
    buildTypes {
        release {
            minifyEnabled = true
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt")
        }
    }
    compileSdk = 35
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
    lintOptions {
        disable "WrongThread"
    }
    namespace = "com.example.androidx"
}
