plugins {
    id 'com.android.library'
}

android {
    compileSdkVersion 31

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"

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

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    api project(':markwon-core')

    deps.with {
        // add a compileOnly dependency, so if this artifact is present
        // we will try to obtain a SpanFactory for a Strikethrough node and use
        // it to be consistent with markdown (please note that we do not use markwon plugin
        // for that in case if different implementation is used)
        compileOnly it['commonmark-strikethrough']

        testImplementation it['ix-java']
    }

    deps.test.with {
        testImplementation it['junit']
        testImplementation it['robolectric']
    }
}