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


android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildFeatures {
        dataBinding = true
        // for view binding :
        // viewBinding = true
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    configurations.all {
        resolutionStrategy.force "org.antlr:antlr4-runtime:4.7.1"
        resolutionStrategy.force "org.antlr:antlr4-tool:4.7.1"
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

    // android support libraries
    api "androidx.appcompat:appcompat:$rootProject.supportLibraryVersion"
    api "androidx.recyclerview:recyclerview:$rootProject.recyclerViewVersion"
    api "androidx.cardview:cardview:$rootProject.cardViewVersion"
    api "com.google.android.material:material:$rootProject.materialVersion"
    api "androidx.vectordrawable:vectordrawable:$rootProject.vectorDrawableVersion"
    api "androidx.vectordrawable:vectordrawable-animated:$rootProject.animatedVectorDrawableVersion"
    api "androidx.constraintlayout:constraintlayout:$rootProject.constraintLayoutVersion"
    api 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    api "android.arch.work:work-runtime:$rootProject.workVersion"
    api 'pub.devrel:easypermissions:1.0.1'

    // image
    api 'com.github.chrisbanes:PhotoView:2.2.0'
    api 'io.coil-kt:coil:1.0.0'
    // parser
    api "com.google.code.gson:gson:$rootProject.gsonVersion"

//    api 'com.implimentz:unsafe:0.0.6'

    // view
    api 'com.zzhoujay:html:1.0.2'
    api 'com.zzhoujay.richtext:richtext:3.0.8'
    api 'com.drakeet.multitype:multitype:4.2.0'
//    api "androidx.viewpager2:viewpager2:$rootProject.viewpager2"
//    api 'com.ethanhua:skeleton:1.1.2'
    api 'io.supercharge:shimmerlayout:2.1.0'
    api "com.airbnb.android:lottie:$rootProject.lottieVersion"
    api "com.drakeet.multitype:multitype:$rootProject.multiTypeVersion"
    // logger
    api "com.jakewharton.timber:timber:$rootProject.timberVersion"
    // view model
    api "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
    api "androidx.lifecycle:lifecycle-common-java8:$rootProject.lifecycleVersion"
    api "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycleVersion"
    // guava
    api "com.google.guava:guava:$rootProject.guavaVersion"
    // jsoup
    api "org.jsoup:jsoup:$rootProject.jsoupVersion"
    api "com.squareup.okhttp3:okhttp:$rootProject.okHttpVersion"
    api "com.github.franmontiel:PersistentCookieJar:v1.0.1"
//    api "com.squareup.retrofit2:retrofit:2.7.1"
    // database
    api "androidx.room:room-runtime:$rootProject.roomVersion"
    api "androidx.room:room-ktx:$rootProject.roomVersion"
    // event-bus
    api "org.greenrobot:eventbus:$rootProject.eventbusVersion"
    // bugly
    api "com.tencent.bugly:crashreport_upgrade:$rootProject.buglyVersion"

    // kotlin

    api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutineVersion"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutineVersion"

    api(name:"umeng-common-9.3.8")
    api(name:"umeng-asms-armeabi-v1.2.2", ext:'aar')
    api(name:"umeng-apm-armeabi-v1.2.0", ext:'aar')
    // 应用性能监控SDK依赖(可选)
    api(name:"umeng-abtest-v1.0.0", ext:'aar')// ABTest功能依赖(可选)

    // test related
    // java script engine
//    testApi 'io.apisense:rhino-android:1.1.1'
//    testImplementation "junit:junit:$rootProject.junitVersion"
//    androidTestImplementation "androidx.test:runner:$rootProject.runnerVersion"
//    androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"

}
