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

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.byl.mvvm"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        flavorDimensions versionName
    }

    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'
    }

    buildFeatures {
        viewBinding = true
    }

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

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'

    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation 'com.google.android.material:material:1.1.0'


    //glide图片加载框架
    final GLIDE_VERSION = '4.11.0'
    implementation "com.github.bumptech.glide:glide:$GLIDE_VERSION"
    implementation "com.github.bumptech.glide:okhttp3-integration:$GLIDE_VERSION"

    //网络请求框架
    final RETROFIT_VERSION = '2.8.1'
    implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
    implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"

    //网络请求cookie缓存
    implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1'

    //PhotoView
    implementation 'com.github.chrisbanes:PhotoView:2.3.0'

    //刷新框架
    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.2'
    implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.2'

    //EventBus
    implementation 'org.greenrobot:eventbus:3.2.0'

}