plugins {
    id 'com.android.application'
    id 'kotlin-android'
    alias(libs.plugins.compose.compiler)
}

android {
    namespace 'com.dokar.chiptextfield.sample'

    compileSdk libs.versions.androidCompileSdk.get().toInteger()

    defaultConfig {
        applicationId "com.dokar.chiptextfield.sample"
        minSdk 21
        targetSdk libs.versions.androidTargetSdk.get().toInteger()
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildFeatures {
        compose true
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    kotlin {
        jvmToolchain(11)
    }
}

dependencies {

    implementation project(':chiptextfield')
    implementation project(':chiptextfield-m3')
    implementation project(':sample:shared')
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation platform("androidx.compose:compose-bom:$composeBomVersion")
    implementation "androidx.compose.ui:ui"
    implementation "androidx.compose.material:material"
    implementation "androidx.compose.material3:material3"
    implementation "androidx.compose.ui:ui-tooling-preview"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
    implementation 'androidx.activity:activity-compose:1.8.2'

    implementation "io.coil-kt:coil-compose:2.6.0"

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation platform("androidx.compose:compose-bom:$composeBomVersion")
    androidTestImplementation "androidx.compose.ui:ui-test-junit4"
    debugImplementation "androidx.compose.ui:ui-tooling"
}