plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'com.jakewharton.butterknife'
}

android {
    compileSdkVersion rootProject.ext.compileVersion
    buildToolsVersion rootProject.ext.buildVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdk
        targetSdkVersion rootProject.ext.targetSdk
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"

        buildConfigField "String", "SDK_VERSION", "\"当前版本V1.4.0\""
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
}

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "androidx.core:core-ktx:$coreKtxVersion"
    implementation "androidx.appcompat:appcompat:$appcompatVersion"
    implementation "com.google.android.material:material:$materialVersion"
    implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion"
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    //android 4.4以上沉浸式实现
    // 基础依赖包，必须要依赖
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
    // kotlin扩展（可选）
    implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
    // fragment快速实现（可选）已废弃
    implementation 'com.geyifeng.immersionbar:immersionbar-components:3.2.2'
    //图片加载
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    //View注解
    implementation 'com.jakewharton:butterknife:10.2.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
    //消息订阅
    implementation 'org.greenrobot:eventbus:3.1.1'

    implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
    implementation "com.google.code.gson:gson:$gsonVersion"

    // ERTC和白板 SDK接入
    api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}