plugins {
    alias(libs.plugins.kotlin.kover)
    alias(libs.plugins.android.application)
    alias(libs.plugins.compose.compiler)
    alias(libs.plugins.compose)
    alias(libs.plugins.kotlin.android)
}

android {
    namespace = "ch.dissem.yaep"
    compileSdk = libs.versions.android.compileSdk.get().toInt()

    defaultConfig {
        applicationId = "ch.dissem.yaep"
        minSdk = libs.versions.android.minSdk.get().toInt()
        targetSdk = libs.versions.android.targetSdk.get().toInt()
        versionCode = libs.versions.app.version.code.get().toInt()
        versionName = libs.versions.app.version.name.get()
    }

    dependencies {
        implementation(compose.components.resources)
        implementation(compose.runtime)
//        implementation(compose.foundation)
        implementation(compose.material3)
        implementation(compose.ui)
        implementation(compose.components.resources)
        implementation(libs.androidx.activity.compose)
//        implementation(libs.compose.ui.text.googlefonts)
        implementation(projects.commonUI)
//        implementation(compose.components.uiToolingPreview)
        implementation(libs.androidx.tooling.preview)

        testImplementation(libs.kotlin.test)
        testImplementation(libs.atrium)
    }

    compileOptions {
        sourceCompatibility = JavaVersion.toVersion(libs.versions.jdk.get())
        targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get())
    }

    buildTypes {
        release {
            isMinifyEnabled = false
        }

        debug {
            enableAndroidTestCoverage = true
            enableUnitTestCoverage = true
        }
    }

    packaging {
        resources {
            merges += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }

    lint {
        baseline = file("lint-baseline.xml")
    }

}

dependencies {
    implementation(libs.androidx.core.ktx)
    debugImplementation(libs.androidx.tooling)
}
