apply plugin: 'com.android.library'

dependencies {
    implementation 'com.android.support:support-annotations:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support:support-core-ui:27.0.2'

    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-all:1.9.5'
    testImplementation 'org.robolectric:robolectric:4.0.1'

    androidTestImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test:rules:1.0.1'
    androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.19.0'
}

android {
    compileSdkVersion 28
    buildToolsVersion '26.0.2'

    defaultConfig {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        minSdkVersion 16
    }

    sourceSets {
        main.manifest.srcFile 'AndroidManifest.xml'
        main.java.srcDirs = ['src']
        main.aidl.srcDirs = ['src']
        main.res.srcDir 'res'
        main.assets.srcDir 'assets'
        main.resources.srcDir 'java'

        test.setRoot('junit')
        test.java.srcDir('junit/src/')

        androidTest.setRoot('tests')
        androidTest.java.srcDir('tests/src/')
        androidTest.res.srcDir('tests/res/')
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
