tasks.whenTaskAdded { task ->
    if (task.name == "lint") {
        task.enabled = false
    }
}
apply plugin: 'com.android.application'

dependencies {
    // Appcompat is required to ensure that Glide's runtime detection the v7 support Drawable
    // loading classes functions. It's not clear why androidTestImplementation isn't sufficient, but for
    // whatever reason, compile is the only dependency that seems to work.
    implementation ("com.android.support:appcompat-v7:${ANDROID_SUPPORT_VERSION}") {
        exclude group: 'android.arch.core'
    }
    annotationProcessor project(":annotation:compiler")
    implementation project(":library")

    androidTestImplementation project(':library')
    androidTestImplementation "org.mockito:mockito-android:${MOCKITO_ANDROID_VERSION}"
    androidTestImplementation "com.android.support:support-fragment:${ANDROID_SUPPORT_VERSION}"
    androidTestImplementation "com.android.support:support-annotations:${ANDROID_SUPPORT_VERSION}"
    androidTestImplementation "androidx.test:runner:${ANDROIDX_TEST_VERSION}"
    androidTestImplementation "androidx.test:rules:${ANDROIDX_TEST_VERSION}"
    androidTestImplementation "com.google.truth:truth:${TRUTH_VERSION}"
    androidTestImplementation "junit:junit:${JUNIT_VERSION}"
    // Not totally clear why this is required, but it seems to be missing when tests are run on
    // 4.1.2 and 4.2.0 emulators.
    androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2'
}

android {
    compileSdkVersion COMPILE_SDK_VERSION as int

    defaultConfig {
        applicationId 'com.bumptech.glide.instrumentation'
        minSdkVersion MIN_SDK_VERSION as int
        targetSdkVersion TARGET_SDK_VERSION as int
        versionCode 1
        versionName '1.0'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

