apply plugin: 'com.android.library'
apply from: '../build-config/gradle-quality.gradle'

dependencies {
    compileOnly "com.google.android.gms:play-services-gcm:$playServicesVersion"
    compileOnly "androidx.work:work-runtime:$workVersion"

    //noinspection GradleCompatible,GradleDependency
    api 'androidx.core:core:1.7.0'

    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test:rules:1.4.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation 'com.squareup.assertj:assertj-android:1.1.1'
    androidTestImplementation "com.google.android.gms:play-services-gcm:$playServicesVersion"
    androidTestImplementation "androidx.work:work-runtime:$workVersion"
    androidTestImplementation "androidx.work:work-testing:$workVersion"

    androidTestImplementation "com.facebook.stetho:stetho:$stethoVersion"
    androidTestImplementation 'androidx.appcompat:appcompat:1.3.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'

    testImplementation "junit:junit:$junitVersion"
    testImplementation "org.mockito:mockito-core:$mockitoVersion"
    testImplementation "org.assertj:assertj-core:$assertjVersion"
    testImplementation "org.robolectric:robolectric:$robolectricVersion"
    testImplementation 'androidx.test:core:1.4.0'
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    resourcePrefix 'job_'

    useLibrary 'android.test.mock'

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        versionName project.VERSION_NAME
        versionCode Integer.parseInt(project.VERSION_CODE)

        consumerProguardFiles 'proguard.cfg'

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    lintOptions {
        abortOnError true
    }

    testOptions {
        unitTests.returnDefaultValues = true
        unitTests.includeAndroidResources = true
        unitTests.all {
            testLogging {
                events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
            }
        }
    }

    packagingOptions {
        exclude 'META-INF/proguard/androidx-annotations.pro'
    }
}

apply from: '../build-config/gradle-push.gradle'