buildscript {
    dependencies {
        classpath "com.android.tools.build:gradle:$gradle_android_version"
    }
    repositories {
        google()
    }
}

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

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId 'com.github.florent37.kotlin.sample'
        minSdkVersion 16
        targetSdkVersion 27
        multiDexEnabled true
        versionCode 10
        versionName '1.0.9'
        testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
    }
    buildTypes {
        debug {}
        release {}
    }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    flavorDimensions "server"
    productFlavors {
        local {
            dimension "server"
        }
        prod {
            dimension "server"
        }
    }

    packagingOptions {
        exclude 'META-INF/common.kotlin_module'
    }

    tasks.lint.enabled = false
}

dependencies {
    implementation project(':common')
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:multidex:1.0.3'
   
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    kapt 'android.arch.lifecycle:compiler:1.1.1'
    
    implementation 'com.github.bumptech.glide:glide:3.8.0'
    implementation 'com.github.florent37:shapeofview:1.3.2'

    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
    
    implementation "io.ktor:ktor-client-okhttp:$ktor_version"
    implementation "io.ktor:ktor-client-json-jvm:$ktor_version"
    
    testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
}