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

android {
    compileSdkVersion 27

    dataBinding {
        enabled = true
    }

    defaultConfig {
        applicationId "net.gahfy.feedme"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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']
        androidTest.java.srcDirs = ['src/androidTest/kotlin']
    }
}


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.android.support:recyclerview-v7:27.0.2'
    implementation "com.android.support.constraint:constraint-layout:1.0.2"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    //Retrofit 2
    implementation "com.squareup.retrofit2:retrofit:2.3.0"
    implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
    implementation "com.squareup.retrofit2:converter-moshi:2.3.0"

    // Dagger 2
    implementation "com.google.dagger:dagger:2.14.1"
    kapt "com.google.dagger:dagger-compiler:2.14.1"
    compileOnly "org.glassfish:javax.annotation:3.1.1"

    //Rx
    implementation "io.reactivex.rxjava2:rxjava:2.1.9"
    implementation "io.reactivex.rxjava2:rxandroid:2.0.2"

    // Data binding
    kapt "com.android.databinding:compiler:3.0.1"
}
