buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
    }
}

apply plugin: 'com.android.library'

def getExtOrDefault(name, fallback) {
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback
}



android {
    compileSdkVersion getExtOrDefault('compileSdkVersion', 29)
    buildToolsVersion getExtOrDefault('buildToolsVersion', "28.0.3")

    defaultConfig {
        minSdkVersion getExtOrDefault('minSdkVersion', 16)
        targetSdkVersion getExtOrDefault('targetSdkVersion', 29)
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
    sourceSets { main { java.srcDirs = ['src/main/java', 'src/main/tests'] } }

    testOptions {
        unitTests.returnDefaultValues = true
    }
}

repositories {
    mavenCentral()
    jcenter()
    google()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
    }
}

dependencies {
    implementation 'com.facebook.react:react-native:+'

    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:1.10.19'
    testImplementation group: 'org.powermock', name: 'powermock-core', version: '1.6.6'
    testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.6'
    testImplementation group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.6'

}
