plugins {
    alias libs.plugins.android.library
    alias libs.plugins.kotlin.android
    alias libs.plugins.benchmark
}

android {
    namespace 'ir.erfansn.artouch.benchmark'
    compileSdk sdk.versions.compile.get().toInteger()

    defaultConfig {
        minSdk sdk.versions.min.get().toInteger()
        targetSdk sdk.versions.target.get().toInteger()

        testInstrumentationRunner "androidx.benchmark.junit4.AndroidBenchmarkRunner"
    }

    testBuildType = "release"
    buildTypes {
        debug {
            // Since debuggable can"t be modified by gradle for library modules,
            // it must be done in a manifest - see src/androidTest/AndroidManifest.xml
            minifyEnabled true
            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "benchmark-proguard-rules.pro"
        }
        release {
            isDefault = true
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
}

dependencies {
    androidTestImplementation project(':producer')

    androidTestImplementation libs.androidx.camera.core

    androidTestImplementation libs.junit4
    androidTestImplementation libs.androidx.test.core
    androidTestImplementation libs.androidx.test.runner
    androidTestImplementation libs.androidx.benchmark
    androidTestImplementation libs.io.insert.koin.test.asProvider()
    androidTestImplementation libs.io.insert.koin.test.junit4
    androidTestImplementation libs.kotlinx.coroutines.test
}