plugins {
    alias(libs.plugins.android.library)
}

def cfg = rootProject.ext

android {
    namespace cfg.applicationId.base
    compileSdk cfg.android.compileSdkVersion

    defaultConfig {
        minSdk cfg.android.minSdkVersion

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

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: project.getName()]
            }
        }
    }

    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 cfg.dependencies.glide
    api cfg.dependencies.eventbus
    api cfg.dependencies.gson
    api cfg.libARouter
    annotationProcessor cfg.libARouterCompiler
    implementation libs.core//markdown
    implementation libs.appcompat
    implementation libs.material
    implementation libs.activity
    implementation libs.constraintlayout
    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
}