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

buildscript {
  repositories {
    google()
    jcenter()
  }

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

apply plugin: 'com.android.library'

android {
  compileSdkVersion safeExtGet('compileSdkVersion', 27)
  buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')

  defaultConfig {
    minSdkVersion 16
    targetSdkVersion safeExtGet('targetSdkVersion', 27)
  }
  lintOptions {
    abortOnError false
  }
}

repositories {
  mavenCentral()
}

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