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

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "de.dorianscholz.openlibre"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 5
        versionName "0.2.3"
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        project.ext.set("archivesBaseName", defaultConfig.applicationId + "-" + defaultConfig.versionName);
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
}

dependencies {
    compile fileTree(include: ["*.jar"], dir: "libs")
    androidTestCompile("com.android.support.test.espresso:espresso-core:2.2.2", {
        exclude group: "com.android.support", module: "support-annotations"
    })
    compile "io.realm:android-adapters:2.1.0"
    compile "com.github.PhilJay:MPAndroidChart:v3.0.2"
    compile "com.android.support:appcompat-v7:25.3.1"
    compile "com.android.support:design:25.3.1"
    compile "com.android.support:support-v4:25.3.1"
    compile "com.android.support:recyclerview-v7:25.3.1"
    compile "commons-io:commons-io:2.5"
    compile "org.apache.commons:commons-math3:3.6.1"
    compile "com.google.code.gson:gson:2.8.0"
    testCompile "junit:junit:4.12"
    debugCompile "com.facebook.stetho:stetho:1.5.0"
    debugCompile "com.uphyca:stetho_realm:2.0.1"
    compile "com.faendir:acra:4.9.3-SNAPSHOT"
    compile "io.tidepool.api:tidepool-api-lib-debug@aar"
    compile "com.android.volley:volley:1.0.0"
    compile "com.jayway.awaitility:awaitility:1.7.0"
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.15"
}

// include user specific build tasks
if (file("user.gradle").exists()) {
    apply from: "user.gradle" // this file should not be committed to git
}
repositories {
    mavenCentral()
}
