/*
 *  Copyright 2016 Fabio Collini.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.
 */

buildscript {
    repositories {
        mavenCentral()
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "it.cosenonjaviste.daggeroverride"
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
}

dependencies {
    testImplementation "junit:junit:$JUNIT_VERSION"
    testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
    implementation 'androidx.appcompat:appcompat:1.2.0'

    implementation "com.google.dagger:dagger:$DAGGER_VERSION"
    testImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
    androidTestImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
    annotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
    testAnnotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
    androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"

    testImplementation project(':daggermock')
    androidTestImplementation project(':daggermock')

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

    testImplementation "org.robolectric:robolectric:$ROBOLECTRIC_VERSION"
    testImplementation "androidx.test:runner:$ANDROIDX_TEST_VERSION"
    testImplementation "androidx.test:rules:$ANDROIDX_TEST_VERSION"
    testImplementation "androidx.test:core:$ANDROIDX_TEST_VERSION"

    androidTestImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
    androidTestImplementation "org.mockito:mockito-android:$MOCKITO_VERSION"
    androidTestImplementation "androidx.test:runner:$ANDROIDX_TEST_VERSION"
    androidTestImplementation "androidx.test:rules:$ANDROIDX_TEST_VERSION"
    androidTestImplementation "androidx.test:core:$ANDROIDX_TEST_VERSION"
    androidTestImplementation "androidx.test.espresso:espresso-core:$ANDROIDX_ESPRESSO_VERSION"
}
