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

ext {
    okhttp_version = '3.8.1'
    retrofit_version = '2.2.0'
    rxjava_version = '2.1.7'
    androidArchitectureVersion = "1.1.0"
    anko_version='0.10.4'
}

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

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion rootProject.ext.targetSdkVersion
        applicationId "koin.sampleapp"
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
        test.java.srcDirs += 'src/test/kotlin'
    }
}

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

    implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
    implementation "com.android.support:design:$supportLibraryVersion"

    // Koin
    implementation "org.koin:koin-android-architecture:$koin_version"
    testImplementation "org.koin:koin-test:$koin_version"
    testImplementation "org.mockito:mockito-core:$mockito_version"

    // Anko
    compile "org.jetbrains.anko:anko-commons:$anko_version"

    // UI
    implementation 'com.joanzapata.iconify:android-iconify-weathericons:2.2.2'

    //json
    implementation 'com.google.code.gson:gson:2.8.1'

    // Networking
    implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
    implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
    implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
    implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
    implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"

    // ViewModel and LiveData
    implementation "android.arch.lifecycle:extensions:$androidArchitectureVersion"
    annotationProcessor "android.arch.lifecycle:compiler:$androidArchitectureVersion"
    testImplementation "android.arch.core:core-testing:$androidArchitectureVersion"

    // Rx
    implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
repositories {
    mavenCentral()
}
