apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        consumerProguardFiles "consumer-rules.pro"
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

    repositories {
        flatDir {
            dirs 'libs' // aar用到
        }
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/AL2.0'
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        exclude 'META-INF/rxjava.properties'
        exclude("META-INF/*.kotlin_module")
    }


}

dependencies {
    api fileTree(include: ['*.jar'], dir: 'libs')
    api fileTree(include: ['*.aar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    api 'androidx.appcompat:appcompat:1.2.0-alpha02'
    api 'com.android.support:design:28.0.0'
//    api 'com.android.support:multidex:1.0.0'
    api 'com.squareup.okhttp3:okhttp:3.10.0'
    api 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    api 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
    api 'com.trello.rxlifecycle2:rxlifecycle:2.2.0'
    api 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.0'
    api 'com.squareup.retrofit2:retrofit:2.3.0'
    api 'com.squareup.retrofit2:converter-gson:2.3.0'
    api 'com.badoo.mobile:android-weak-handler:1.1'

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
}