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

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        flatDir {
            dirs 'libs'
        }
    }
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion safeExtGet('compileSdkVersion', 27)
    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 17)
        targetSdkVersion safeExtGet('targetSdkVersion', 27)
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    api "com.facebook.react:react-native:+"
    implementation 'com.github.CanHub:Android-Image-Cropper:4.1.0'
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
