import io.getstream.chat.android.Configuration

android {
    compileSdk Configuration.compileSdk

    defaultConfig {
        minSdk Configuration.minSdk
        targetSdk Configuration.targetSdk
        versionName Configuration.versionName
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
    }

    tasks.withType(JavaCompile).configureEach {
        this.targetCompatibility = JavaVersion.VERSION_11.toString()
        this.sourceCompatibility = JavaVersion.VERSION_11.toString()
    }

    testOptions {
        unitTests {
            includeAndroidResources = true
            returnDefaultValues = true
            all {
                testLogging {
                    events = ["FAILED"]
                    showExceptions = true
                    showCauses = true
                    showStackTraces = true
                    exceptionFormat = "full"
                }
            }
        }
    }
}
