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", "dynamic")
    }
}

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

    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

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

        vectorDrawables.useSupportLibrary = true
    }

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

    sourceSets {
        main {
            manifest.srcFile 'src/main/AndroidManifest.xml'
            res.srcDirs = [
                    'src/main/res'
            ]
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/rxjava.properties'
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.aar','*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    kapt 'com.alibaba:arouter-compiler:1.2.2'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0'
    implementation 'com.pnikosis:materialish-progress:1.7'
    implementation 'com.daimajia.numberprogressbar:library:1.4@aar'
    implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.1.5'
    api rootProject.ext.dependencies["ydl-user-router"]

    api project(':ydl-webview')
    api project(':ydl-platform')
    api project(":ydl-pay")
    implementation project(":api:im")
    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')
}
