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

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

// Maven artifact
ext.mavenArtifactId = "drop-in"
ext.mavenArtifactName = "Adyen checkout drop-in component"
ext.mavenArtifactDescription = "Adyen checkout drop-in component client for Adyen's Checkout API."

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

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

        // Get scheme for redirect result
        manifestPlaceholders = ["checkoutRedirectScheme": rootProject.ext.checkoutRedirectScheme]
    }

    buildFeatures {
        viewBinding true
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }
}

dependencies {
    // Checkout
    api project(':3ds2')
    api project(':ach')
    api project(':action-core')
    api project(':bacs')
    api project(':bcmc')
    api project(':boleto')
    api project(':blik')
    api project(':card')
    api project(':cashapppay')
    api project(':convenience-stores-jp')
    api project(':dotpay')
    api project(':entercash')
    api project(':eps')
    api project(':giftcard')
    api project(':googlepay')
    api project(':ideal')
    api project(":instant")
    api project(':mbway')
    api project(':meal-voucher-fr')
    api project(':molpay')
    api project(':online-banking-cz')
    api project(':online-banking-jp')
    api project(':online-banking-pl')
    api project(':online-banking-sk')
    api project(':openbanking')
    api project(':payeasy')
    api project(':paybybank')
    api project(':paybybank-us')
    api project(':payto')
    api project(':sepa')
    api project(':seven-eleven')
    api project(':sessions-core')
    api project(':twint')
    api project(':upi')
    api project(':wechatpay')

    // Dependencies
    implementation libs.androidx.recyclerview
    implementation libs.material

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