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

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

    defaultConfig {
        applicationId "com.androidhuman.example.rxjavainaction"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    dexOptions {
        incremental true
        javaMaxHeapSize "4g"
        preDexLibraries = !rootProject.ext.ci
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
        test.java.srcDirs += 'src/test/kotlin'
    }

}

dependencies {
    compile rootProject.ext.appCompat
    compile rootProject.ext.constraintLayout
    compile rootProject.ext.design
    compile rootProject.ext.kotlin
    compile rootProject.ext.rxAndroid
    compile rootProject.ext.rxBinding
    compile rootProject.ext.rxJava
    compile rootProject.ext.rxRelay

    testCompile rootProject.ext.junit
}