apply plugin: 'com.android.library'
apply plugin: 'maven'

def safeExtGet(prop, fallback) {
    rootProject.hasProperty(prop) ? rootProject.getProperty(prop) : fallback
}

android {
    compileSdkVersion safeExtGet("compileSdkVersion", 28)
    buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3")

    defaultConfig {
        minSdkVersion safeExtGet("minSdkVersion", 16)
        targetSdkVersion safeExtGet("targetSdkVersion", 27)
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compileOnly 'com.facebook.react:react-native:+'


    testImplementation 'junit:junit:4.12'
    testImplementation 'org.robolectric:robolectric:3.6.1'
    testImplementation 'org.mockito:mockito-core:1.+'
    testImplementation 'com.squareup.retrofit2:retrofit:2.1.0'
    testImplementation 'com.squareup.retrofit2:converter-gson:2.0.0'

    compileOnly 'com.squareup.retrofit2:retrofit:2.1.0'
    compileOnly 'com.squareup.retrofit2:converter-gson:2.0.0'

}
