/**
 * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *     http://aws.amazon.com/apache2.0/
 *
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion '28.0.2'

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            testCoverageEnabled true
        }
    }
    // This is for excluding duplicate jackson dependencies.
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
        exclude 'META-INF/services/com.fasterxml.jackson.core.ObjectCodec'
    }
}

apply plugin: 'jacoco'
jacoco {
    version "0.7.1.201405082137"
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':Utils')

    androidTestImplementation('com.android.support.test:runner:0.4.1'){
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation ('com.android.support.test:rules:0.4.1'){
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation 'junit:junit:4.12'
    androidTestImplementation 'org.mockito:mockito-core:1.9.5'
    androidTestImplementation "com.google.dexmaker:dexmaker:1.0"
    androidTestImplementation "com.google.dexmaker:dexmaker-mockito:1.0"

    testImplementation 'junit:junit:4.12'
    testImplementation('org.robolectric:robolectric:3.0') {
        exclude group: 'commons-logging', module: 'commons-logging'
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
    }

    testImplementation 'com.segment.analytics.android:analytics-tests:4.0.0'

    testImplementation 'org.assertj:assertj-core:1.7.1'

    testImplementation 'org.mockito:mockito-core:1.10.19'

    testImplementation 'org.powermock:powermock:1.6.2'
    testImplementation 'org.powermock:powermock-module-junit4:1.6.2'
    testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.2'
    testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
    testImplementation 'org.powermock:powermock-classloading-xstream:1.6.2'
}

