/**
 * 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.application'
//apply plugin: 'me.tatarka.retrolambda'
// Uncomment when using CrashlyticsComponent
//apply plugin: 'io.fabric'
apply from: "../artifacts.gradle"

repositories {
    // Uncomment when using CrashlyticsComponent
    //maven { url 'https://maven.fabric.io/public' }
}

buildscript {
    repositories {
        jcenter()
        // Uncomment when using CrashlyticsComponent
        //maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        //classpath 'me.tatarka:gradle-retrolambda:3.2.3'
        // Uncomment when using CrashlyticsComponent
        //classpath 'io.fabric.tools:gradle:1.+'
    }
}

android {
    compileSdkVersion 23
    buildToolsVersion '28.0.2'

    defaultConfig {
        applicationId "com.fireappbuilder.android.calypso"
        minSdkVersion 21
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 23
        versionCode 10
        versionName "1.0.7"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    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 jackson
    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'
        exclude 'META-INF/rxjava.properties'
    }

    lintOptions {
        abortOnError false
    }

}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation 'junit:junit:4.12'
    androidTestImplementation 'org.mockito:mockito-core:1.9.5'
    androidTestImplementation ('com.android.support.test:rules:0.5') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation ('com.android.support.test:runner:0.5') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
    androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'

    androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.3.1'

    implementation project(':TVUIComponent')
    implementation project(':UAMP')
    implementation project(':AMZNMediaPlayerComponent')
    implementation project(':PassThroughAdsComponent')
    implementation project(':PassThroughLoginComponent')
    implementation project(':LoggerAnalyticsComponent')
    androidTestImplementation project(path: ':ContentBrowser')
}
