apply plugin: 'com.android.library'

def _ext = rootProject.ext;

def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+';
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 29;
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '29.0.2';
def _minSdkVersion = _ext.has('minSdkVersion') && _ext.minSdkVersion > 16 ? _ext.minSdkVersion : 17;
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 29;
def _renderscriptVersion =
  _ext.has('renderscriptVersion') && _ext.renderscriptVersion > 20 ? _ext.renderscriptVersion : 21;

android {
    compileSdkVersion _compileSdkVersion
    buildToolsVersion _buildToolsVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion _minSdkVersion
        targetSdkVersion _targetSdkVersion
        versionCode 1
        versionName "1.0"
        renderscriptTargetApi _renderscriptVersion
        renderscriptSupportModeEnabled true
    }
    lintOptions {
        abortOnError false
    }
}

dependencies {
    compileOnly "com.facebook.react:react-native:${_reactNativeVersion}"
    //noinspection GradleDynamicVersion
    compileOnly "com.parse.bolts:bolts-tasks:+"
    implementation 'com.github.iyegoroff:ReflectUtils:1.2.1'
}

repositories {
    maven {
        url "https://jitpack.io"
    }
}
