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

buildscript {
  repositories {
    google()
    jcenter()

    maven {
      url 'https://maven.google.com'
    }
  }

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

apply plugin: 'com.android.library'

android {
  compileSdkVersion safeExtGet('compileSdkVersion', 26)

    defaultConfig {
    minSdkVersion safeExtGet('minSdkVersion', 16)
    targetSdkVersion safeExtGet('targetSdkVersion', 26)
  }
  lintOptions {
    abortOnError false
    warning 'InvalidPackage'
  }
    buildToolsVersion '27.0.3'
}

repositories {
  mavenCentral()
  maven {
   url 'https://maven.google.com'
  }
  maven { url "https://jitpack.io" }
  maven {
    // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
    url "$rootDir/../node_modules/react-native/android"
  }
  flatDir{
    dirs "libs"
  }
}

dependencies {
  compileOnly 'com.facebook.react:react-native:+'
  implementation (name: 'org.elastos.carrier-release', ext: 'aar')
}
