//plugins {
//    alias(libs.plugins.android.application)
//}
def cfg = rootProject.ext
if (isModule.booleanValue()) {
    apply plugin: 'com.android.application'
} else {
    apply plugin: 'com.android.library'
}
apply from: "${rootProject.rootDir}/config_build.gradle"
android {
    compileSdk cfg.android.compileSdkVersion
    namespace 'com.example.module.chat'
    defaultConfig {
        if (isModule.booleanValue()) {
            applicationId cfg.applicationId.chat
        }
        minSdk cfg.android.minSdkVersion
        targetSdk cfg.android.targetSdkVersion
        versionCode cfg.android.versionCode
        versionName cfg.android.versionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        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
    }
    buildFeatures {
        viewBinding true
        dataBinding true
    }
    sourceSets {
        main {
            if (isModule) {
                manifest.srcFile 'src/main/AndroidManifest.xml'
            } else {
                manifest.srcFile 'src/main/release/AndroidManifest.xml'
            }
        }
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.0.0'                 //必须 1.0.0 以上
    implementation libs.core//markdown
    implementation  'io.github.scwang90:refresh-layout-kernel:3.0.0-alpha'      //核心必须依赖
    implementation  'io.github.scwang90:refresh-header-classics:3.0.0-alpha'    //经典刷新头
    implementation  'io.github.scwang90:refresh-header-radar:3.0.0-alpha'       //雷达刷新头
    implementation  'io.github.scwang90:refresh-header-falsify:3.0.0-alpha'     //虚拟刷新头
    implementation  'io.github.scwang90:refresh-header-material:3.0.0-alpha'    //谷歌刷新头
    implementation  'io.github.scwang90:refresh-header-two-level:3.0.0-alpha'   //二级刷新头
    implementation  'io.github.scwang90:refresh-footer-ball:3.0.0-alpha'        //球脉冲加载
    implementation  'io.github.scwang90:refresh-footer-classics:3.0.0-alpha'    //经典加载
    implementation libs.okhttp
    api 'com.alibaba:arouter-api:1.5.2'
    implementation libs.activity
    implementation libs.constraintlayout
    annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
    implementation project(':modulesBase:libNetwork')

}