apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: "kotlin-allopen"

allOpen {
    annotation("it.codingjam.github.core.AllOpen")
}

androidExtensions {
    experimental = true
}

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation 'com.google.code.gson:gson:2.8.5'
    api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0"

    api "com.google.dagger:dagger:$dagger_version"
    kapt "com.google.dagger:dagger-compiler:$dagger_version"

    api('com.github.nalulabs.prefs-delegates:prefs-delegates:0.1') {
        exclude group: 'org.jetbrains.kotlin'
    }

    api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    compileOnly 'com.github.pengrad:jdk9-deps:1.0'

    testImplementation project(':testData')
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions{
        freeCompilerArgs = ["-Xskip-metadata-version-check"]
    }
}