plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
    id 'com.google.devtools.ksp'
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName

        buildConfigField "String", "NEW_API_HOST", "\"${NEW_API_HOST}\""

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }

    buildTypes {
        debug {
            buildConfigField "String", "NEW_DEV_API_HOST", "\"${NEW_DEV_API_HOST}\""
        }

        release {
            minifyEnabled false
            consumerProguardFiles 'proguard-rules.pro'

            buildConfigField "String", "NEW_API_HOST", "\"${NEW_API_HOST}\""
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
    ksp "cn.therouter:apt:${routerVersion}"
    kapt "com.google.auto.service:auto-service:${autoServiceVersion}"

    implementation(project(path: ":module_common")) {
        exclude group: 'androidx.swiperefreshlayout'
    }

    implementation "cn.jiguang.sdk:jpush:$jpushVersion"

    // 荣耀通道
    implementation "cn.jiguang.sdk.plugin:honor:$jpushVersion"
    implementation "com.hihonor.mcs:push:$honorPushVersion"

    // OPPO通道
    implementation "cn.jiguang.sdk.plugin:oppo:$jpushVersion"
    implementation 'commons-codec:commons-codec:1.11'

    // VIVO通道
    implementation "cn.jiguang.sdk.plugin:vivo:$jpushVersion"

    implementation(project(':feature:jg_push_lib'))
}