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

android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.github.anastr.rxlab"
        multiDexEnabled true
        minSdkVersion 18
        targetSdkVersion 31
        versionCode 5
        versionName "1.4.1"
    }

    flavorDimensions "default"
    productFlavors {
        develop {
            applicationIdSuffix ".develop"
            resValue "string", "app_name", "Rx Lab Test"
        }
        product {
            resValue "string", "app_name", "Rx Lab"
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
//        debug { // to run on old devices
//            minifyEnabled true
//            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
//        }
    }

// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }

}

dependencies {
    implementation "androidx.core:core-ktx:1.7.0"
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0"

    implementation 'com.github.kbiakov:CodeView-Android:1.3.2'

    implementation 'io.reactivex.rxjava3:rxjava:3.0.7'
    implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
}
