apply plugin: 'com.android.library'

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

android {
    compileSdkVersion safeExtGet('compileSdkVersion', 30)
    buildToolsVersion safeExtGet('buildToolsVersion', '30.0.2')

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 16)
        targetSdkVersion safeExtGet('targetSdkVersion', 30)
        versionCode 1
        versionName "1.0"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    debugCompileOnly 'com.facebook.flipper:flipper:0.125.0'
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
}
