plugins {
    alias(libs.plugins.android.application)
}
def cfg = rootProject.ext

apply from: "${rootProject.rootDir}/config_build.gradle"

android {
    namespace 'com.xuptggg.teaswhisper'


    defaultConfig {

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

    buildFeatures {
        viewBinding = true
        buildConfig = true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            buildConfigField("boolean","isModule",String.valueOf(cfg.isModule))
        }
        debug {
            buildConfigField("boolean","isModule",String.valueOf(cfg.isModule))
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation project(':modulesBase:libBase')

    if (!isModule.booleanValue()) {
        implementation project(':modulesCore:login')
        implementation project(':modulesCore:guidepage')
        implementation project(':modulesCore:navigation')
        implementation project(':modulesCore:individual')
        implementation project(':modulesCore:detection')
        implementation project(':modulesCore:home')
        implementation project(':modulesCore:chat')
        implementation project(':modulesCore:detail')
        implementation project(':modulesCore:forum')
        implementation project(':modulesCore:search')
        implementation project(':modulesCore:recognition')
    }

    api 'com.alibaba:arouter-api:1.5.2'
    annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
    implementation libs.mmkv.v201
    implementation libs.appcompat
    implementation libs.material
    testImplementation libs.junit
    androidTestImplementation libs.ext.junit
    androidTestImplementation libs.espresso.core
}