/*
 * Copyright (c) 2022 Adyen N.V.
 *
 * This file is open source and available under the MIT license. See the LICENSE file for more info.
 *
 * Created by oscars on 9/8/2022.
 */

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

apply from: "${rootDir}/config/gradle/codeQuality.gradle"

android {
    namespace 'com.adyen.checkout.test'
    compileSdk libs.versions.compile.sdk.get().toInteger()

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

        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
        consumerProguardFiles "consumer-rules.pro"
    }

    testFixtures {
        enable = true
    }
}

dependencies {
    testFixturesImplementation project(':checkout-core')
    testFixturesImplementation libs.bundles.androidx.lifecycle
    testFixturesImplementation libs.bundles.junit
    testFixturesImplementation libs.bundles.kotlin.coroutines.test
}

// Disable test tasks, because this module only contains test utils.
tasks.configureEach { task ->
    if(task.name.startsWith('test')) {
        task.enabled = false
    }
}
