/*
 *  The MIT License (MIT)
 *
 *  Copyright (c) 2017 Flipkart Internet Pvt. Ltd.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "net.ltgt.errorprone"

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    lintOptions {
        abortOnError false
    }

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "1.3.12"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }
}

dependencies {
    api fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:2.19.1'
    testImplementation 'org.robolectric:robolectric:3.3.2'
    testImplementation 'com.github.flipkart-incubator.batchman:batching-gson:1.3.9'
    testImplementation 'com.google.code.gson:gson:2.8.5'

    implementation 'com.github.flipkart-incubator.batchman:batching-core:1.3.9'
    implementation 'androidx.annotation:annotation:1.0.2'
    errorprone 'com.google.errorprone:error_prone_core:2.3.3'
}

buildscript {
    repositories {
        maven { url 'https://repo1.maven.org/maven2' }
        maven { url "https://plugins.gradle.org/m2/" }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.12"
    }
}
