apply plugin: 'com.android.library'

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

android {
  compileSdkVersion safeExtGet('compileSdkVersion', 23)
  buildToolsVersion safeExtGet('buildToolsVersion', '23.0.1')

  defaultConfig {
    minSdkVersion safeExtGet('minSdkVersion', 16)
    targetSdkVersion safeExtGet('targetSdkVersion', 22)
    versionCode 1
    versionName "1.0"
    ndk {
      abiFilters "armeabi-v7a", "x86"
    }
  }
}

allprojects {
  repositories {
    jcenter()
    maven { url "$projectDir/../../react-native/android" }
  }
}

dependencies {
  compile fileTree(dir: 'libs', include: '*.jar')
  api 'com.facebook.react:react-native:+'
  implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.5.8'
  implementation 'com.alibaba.android:ddsharesdk:1.1.0'
  implementation 'commons-io:commons-io:2.5'
}
