apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../publish.gradle"

kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", "im")
    }
}

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    buildToolsVersion rootProject.ext.android["buildToolsVersion"]

    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [AROUTER_MODULE_NAME: "im"]
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    sourceSets {
        main {
            res.srcDirs = [
                    'src/main/res',
                    'src/main/res_avchat',
                    'src/main/res_uikit'
            ]
        }
    }

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

dependencies {
    api fileTree(dir: 'libs', include: ['*.aar','*.jar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    kapt 'com.alibaba:arouter-compiler:1.2.2'
    implementation 'com.ydl:nim-base:1.1.1.2'
    implementation 'com.netease.nimlib:avchat:9.2.1'
    implementation 'com.netease.nimlib:nrtc:9.2.1'
    api rootProject.ext.dependencies["ydl-user-router"]
    implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]

    implementation('com.netease.yunxin.kit:call-ui:1.6.3') {
        exclude group: "com.netease.nimlib", module: "avsignalling"
        exclude group: "com.netease.nimlib", module: "basesdk"
    }
    implementation "com.netease.nimlib:avsignalling:9.2.1"

    api project(':ydl-webview')
    api project(':ydl-platform')
    implementation project(":api:im")
    implementation project(":api:audioim")
    implementation project(":api:user")
    implementation project(":api:dynamic")
    implementation project(":api:tests")
    implementation project(":api:course")
    implementation project(":api:fm")
    implementation project(":api:consultant")
    implementation project(':api:confide')
}
