plugins {
    id("com.android.library")
    id("org.jetbrains.kotlin.android")
    id("com.google.devtools.ksp")
}

android {
    namespace = "com.isidroid.ui.slider"
    compileSdk = BuildVersions.COMPILE_SDK

    defaultConfig {
        minSdk = BuildVersions.MIN_SDK

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
//        consumerProguardFiles("consumer-rules.pro")
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = BuildVersions.KOTLIN_COMPILER_EXT_VERSION
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
}

dependencies {
    implementation("androidx.core:core-ktx:${GoogleVersions.coreKtx}")
    implementation("androidx.appcompat:appcompat:${GoogleVersions.appCompat}")
    implementation ("com.google.android.material:material:${GoogleVersions.materialView}")

    // compose
    implementation(platform("androidx.compose:compose-bom:${GoogleVersions.composeBom}"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.ui:ui-graphics")
    implementation("androidx.compose.ui:ui-tooling-preview")
    implementation("androidx.compose.material3:material3")

    // tools
    implementation("com.jakewharton.timber:timber:${ToolsVersions.timber}")

    // testing
    testImplementation("junit:junit:${TestVersions.junit}")
    androidTestImplementation("androidx.test.ext:junit:${TestVersions.junitExt}")
    androidTestImplementation("androidx.test.espresso:espresso-core:${TestVersions.espressoCore}")
    androidTestImplementation(platform("androidx.compose:compose-bom:${GoogleVersions.composeBom}"))
    androidTestImplementation("androidx.compose.ui:ui-test-junit4")
    debugImplementation("androidx.compose.ui:ui-tooling")
    debugImplementation("androidx.compose.ui:ui-test-manifest")

    // testing
    testImplementation("junit:junit:${TestVersions.junit}")
    androidTestImplementation("androidx.test.ext:junit:${TestVersions.junitExt}")
    androidTestImplementation("androidx.test.espresso:espresso-core:${TestVersions.espressoCore}")
    androidTestImplementation(platform("androidx.compose:compose-bom:${GoogleVersions.composeBom}"))
    androidTestImplementation("androidx.compose.ui:ui-test-junit4")
    debugImplementation("androidx.compose.ui:ui-tooling")
    debugImplementation("androidx.compose.ui:ui-test-manifest")
}