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

def skeletonVersion = "1.2.4"
def skeletonVersionCode = 12

android {
    compileSdkVersion 30

    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 30
        versionCode skeletonVersionCode
        versionName skeletonVersion

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        consumerProguardFiles 'proguard-rules.pro'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        beta {
            initWith release
        }
    }
}

dependencies {

    compile "androidx.appcompat:appcompat:1.1.0"
    compile "androidx.core:core-ktx:1.2.0"

    compile "com.airbnb.android:epoxy:3.7.0"

    compile "com.google.android.material:material:1.1.0"

    compile 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'

    def koinVersion = "1.0.2"
    compile "org.koin:koin-android:$koinVersion"
    compile "org.koin:koin-androidx-scope:$koinVersion"
    compile "org.koin:koin-androidx-viewmodel:$koinVersion"
    testImplementation "org.koin:koin-test:$koinVersion"

    compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3"

    compile "io.reactivex.rxjava2:rxjava:2.2.17"
    compile "io.reactivex.rxjava2:rxandroid:2.1.1"
    compile "io.reactivex.rxjava2:rxkotlin:2.4.0"
    compile "com.jakewharton.rxbinding3:rxbinding:3.0.0"

    compile "com.jakewharton.timber:timber:4.7.1"

    compile "com.jakewharton.threetenabp:threetenabp:1.2.0"

    compile "com.github.dmstocking:support-optional:1.2"

    def roomVersion = "2.2.4"
    compile "androidx.room:room-runtime:$roomVersion"
    compile "androidx.room:room-ktx:$roomVersion"
    compile "androidx.room:room-rxjava2:$roomVersion"

    def retrofitVersion = "2.6.0"
    compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
    compile "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
    implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"

    def okhttpVersion = "4.0.1"
    implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
    compile "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"

    compile "com.squareup.moshi:moshi-adapters:1.8.0"

    testImplementation 'junit:junit:4.12'
}

// Used in the .gitlab-ci.yml to access the skeleton version
task getCoreVersion {
    println " skeletonVersion = $skeletonVersion"
}