apply plugin: 'com.android.library'

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

buildscript {
    // The Android Gradle plugin is only required when opening the android folder stand-alone.
    // This avoids unnecessary downloads and potential conflicts when the library is included as a
    // module dependency in an application project.
    if (project == rootProject) {
        repositories {
            google()
            mavenCentral()
            maven { url 'https://www.jitpack.io' }
        }

        dependencies {
        classpath('com.android.tools.build:gradle:4.2.1')
        }
    }
}

android {
    compileSdkVersion safeExtGet('compileSdkVersion', 28)
    buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 16)
        targetSdkVersion safeExtGet('targetSdkVersion', 28)
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    google()
    mavenCentral()
    maven { url 'https://www.jitpack.io' }
}

dependencies {
    implementation 'com.facebook.react:react-native:+'
    implementation 'com.github.prscX:photo-editor-android:master'
    implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.github.yalantis:ucrop:2.2.2-native'
    implementation 'com.android.support:exifinterface:27.1.1'
}
