/*
 * 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 josephj on 14/3/2022.
 */

plugins {
    alias libs.plugins.android.library
    alias libs.plugins.kotlin.android
    alias libs.plugins.kotlin.parcelize
    alias libs.plugins.dokka.convention
}

ext.mavenArtifactId = "sessions-core"
ext.mavenArtifactName = "Adyen Checkout sessions core module"
ext.mavenArtifactDescription = "Core module for Adyen Checkout sessions."

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

android {
    namespace 'com.adyen.checkout.sessions.core'
    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"
    }
}

dependencies {
    // Checkout
    api project(':components-core')

    //Tests
    testImplementation testFixtures(project(':test-core'))
    testImplementation testFixtures(project(':components-core'))
    testImplementation libs.androidx.test.lifecycle
    testImplementation libs.bundles.junit
    testImplementation libs.bundles.kotlin.coroutines.test
    testImplementation libs.bundles.mockito
    testImplementation libs.robolectric
}
