plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
//    id 'kotlin-parcelize'
    id 'kotlin-android'
//    id 'kotlin-android-extensions'
}
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
android {
    compileSdk 31

    defaultConfig {

        minSdk 21
        targetSdk 31
        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
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", project.getName())
    }
}

dependencies {

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'

    //kotlin
    api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1'
    api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"


    //recyclerview
    implementation("androidx.recyclerview:recyclerview:1.2.1")
    // For control over item selection of both touch and mouse driven selection
    implementation("androidx.recyclerview:recyclerview-selection:1.1.0")

    implementation 'com.alibaba:arouter-api:1.5.2'
    kapt 'com.alibaba:arouter-compiler:1.5.2'


    //RxLifecycle
    api 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle-kotlin:4.0.2'
    api 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2'

    //Glide
//    implementation "com.github.bumptech.glide:glide:$glide_version"

    implementation "com.github.bumptech.glide:glide:$glide_version"
    kapt "com.github.bumptech.glide:compiler:$glide_version"
    //Banner
    api 'io.github.youth5201314:banner:2.2.2'

    // BottomNavigation
    api 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'

    // Add Dagger dependencies
    api "com.google.dagger:dagger:$dagger_version"
    kapt "com.google.dagger:dagger-compiler:$dagger_version"

//    implementation("io.reactivex.rxjava3:rxkotlin:3.x.y")
//    // RxKotlin and RxAndroid
////    implementation "io.reactivex:rxkotlin:$rx_kotlin_version"
//    implementation 'com.github.ReactiveX:RxKotlin:3.x-SNAPSHOT'

//    compile "io.reactivex:rxkotlin:$rx_kotlin_version"
    implementation("io.reactivex.rxjava3:rxkotlin:3.0.0")
//    compile "io.reactivex:rxandroid:${rx_android_version}"
    implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
    // Because RxAndroid releases are few and far between, it is recommended you also
    // explicitly depend on RxJava's latest version for bug fixes and new features.
    // (see https://github.com/ReactiveX/RxJava/releases for latest 3.x.x version)
    implementation 'io.reactivex.rxjava3:rxjava:3.0.0'


    //Retrofit
    api("com.squareup.okhttp3:okhttp:${ok_http_version}")
    api "com.squareup.okhttp3:logging-interceptor:${ok_http_version}"

    api "com.squareup.retrofit2:retrofit:${retrofit_version}"
    api "com.squareup.retrofit2:converter-gson:${retrofit_version}"
    api "com.squareup.retrofit2:adapter-rxjava:${retrofit_version}"

    //MulitStateView
    api "com.github.Kennyc1012:MultiStateView:$multi_state_view_version"

    //ARouter
//    implementation "com.alibaba:arouter-api:$arouter_api_version"


    api "com.alibaba:arouter-api:$arouter_api_version"
    kapt "com.alibaba:arouter-compiler:$arouter_api_version"


}