/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */

apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

android {
    compileSdkVersion target_version
    defaultConfig {
        minSdkVersion min_version
        targetSdkVersion target_version
        versionCode 32
        versionName '0.3.9'
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
    productFlavors {
    }
}

gradle.taskGraph.whenReady { taskGraph ->
    taskGraph.allTasks.forEach {
        if (it.name.contains("ReleaseUnitTest")) {
            it.enabled = false
        }
    }
}

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    implementation "androidx.appcompat:appcompat:$androidx_version"
    implementation "androidx.core:core-ktx:$androidx_version"
    implementation "com.google.android.material:material:$material_version"
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation "com.android.support:exifinterface:$support_version"
    implementation 'com.jakewharton.threetenabp:threetenabp:1.1.0'
    implementation 'com.splitwise:tokenautocomplete:2.0.8'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.robolectric:robolectric:4.0-alpha-3'
}