apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

buildscript {
    if (project == rootProject) {
        repositories {
            google()
            jcenter()
            maven { url 'https://www.jitpack.io' }
        }

        dependencies {
            classpath('com.android.tools.build:gradle:4.2.1')
        }
    }
}

apply plugin: 'com.android.library'

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

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 16)
        targetSdkVersion safeExtGet('targetSdkVersion', 28)
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    google()
    mavenCentral()
    maven { url "https://maven.google.com" }
}

dependencies {
    implementation 'com.facebook.react:react-native:+'
    implementation project(':react-native-vector-icons')
    implementation 'com.github.zawadz88.materialpopupmenu:material-popup-menu:4.1.0'
}
