/**
 * 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'
//apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 23
    buildToolsVersion '28.0.2'

    defaultConfig {
        minSdkVersion 21
        //noinspection ExpiredTargetSdkVersion
        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
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    // 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'
    }

    testOptions.unitTests.all {
        testLogging {
            events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
        }
    }
}

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

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:23.1.1'
    //Compile in the recycle view used.
    implementation 'com.android.support:recyclerview-v7:23.1.1'
    api 'com.android.support:leanback-v17:23.1.1'
    api 'org.greenrobot:eventbus:3.0.0'
    api 'com.fasterxml.jackson.core:jackson-core:2.6.0'
    api 'com.fasterxml.jackson.core:jackson-annotations:2.6.0'
    api 'com.fasterxml.jackson.core:jackson-databind:2.6.0'
    // Set this dependency to use JUnit 4 rules
    api 'com.github.bumptech.glide:glide:3.7.0'
    api 'io.reactivex:rxjava:1.1.0'
    api 'io.reactivex:rxjava-async-util:0.21.0'
    api 'io.reactivex:rxjava-computation-expressions:0.21.0'
    api 'io.reactivex:rxandroid:1.1.0'
    api 'com.jakewharton.rxbinding:rxbinding:0.3.0'
    api 'com.trello:rxlifecycle:0.4.0'
    api 'com.trello:rxlifecycle-components:0.4.0'
    api 'commons-codec:commons-codec:1.10'
    api 'com.github.bumptech.glide:glide:3.7.0'
    api 'io.reactivex:rxjava:1.1.0'
    api 'io.reactivex:rxjava-async-util:0.21.0'
    api 'io.reactivex:rxjava-computation-expressions:0.21.0'
    api 'io.reactivex:rxandroid:1.1.0'
    api 'com.jakewharton.rxbinding:rxbinding:0.3.0'
    api 'com.trello:rxlifecycle:0.4.0'
    api 'com.trello:rxlifecycle-components:0.4.0'
    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'
    // Add Robotium tests to android tests.
    androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.3.1'
    androidTestImplementation 'com.android.support.test:runner:0.4'
    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 'org.apache.maven:maven-ant-tasks:2.1.3'
    // This is for JsonObject
    testImplementation 'org.json:json:20140107'
    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'
    testImplementation 'com.android.support.test:runner:0.4'
    implementation project(':Calligraphy')
}

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        //classpath 'me.tatarka:gradle-retrolambda:3.2.3'
    }
}
