buildscript {
    repositories {
        maven{
            url 'http://maven.aliyun.com/nexus/content/groups/public/'
            name 'aliyun'
        }
        google()
        jcenter()
        maven {
            url "https://jitpack.io"
            name 'jitpack'
        }
    }
    dependencies {
        classpath('com.android.tools.build:gradle:3.4.0')
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven{
            url 'http://maven.aliyun.com/nexus/content/groups/public/'
            name 'aliyun'
        }
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "../node_modules/react-native/android"
        }
        maven {
            url "https://jitpack.io"
            name 'jitpack'
        }
    }
}

apply plugin: 'com.android.library'



def getExtValue(rootProject,key,defaultValue ) {
    if (rootProject.hasProperty('ext')) {
        if (rootProject.ext.has(key)) {
            return rootProject.ext[key]
        }
    }
    return defaultValue
}

android {
    compileSdkVersion getExtValue(rootProject,'compileSdkVersion',23)
    buildToolsVersion getExtValue(rootProject,'buildToolsVersion', "23.0.1")

    defaultConfig {
        minSdkVersion getExtValue(rootProject,'minSdkVersion', 16)
        targetSdkVersion getExtValue(rootProject,'targetSdkVersion', 22)
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.facebook.react:react-native:+'
    implementation 'com.google.code.gson:gson:2.8.5'
}
