buildscript {
    if (project == rootProject) {
        repositories {
            google()
            jcenter()
        }

        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.3'
        }
    }
}

apply plugin: 'com.android.library'

def safeExtGet(prop) {
    return rootProject.ext.get(prop)
}

android {
    compileSdkVersion safeExtGet('compileSdkVersion')
    buildToolsVersion safeExtGet('buildToolsVersion')
    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion')
        targetSdkVersion safeExtGet('targetSdkVersion')
        versionCode 1
        versionName "1.0"

    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
        disable 'GradleCompatible'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    mavenLocal()

    maven {
        url("$rootDir/../node_modules/react-native-lio/android/cielo-sdk")
    }
}

dependencies {
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.cielo.lio:order-manager:2.0.1'
    implementation "com.squareup.okhttp3:okhttp"
    implementation platform('com.squareup.okhttp3:okhttp-bom:4.12.0')
    implementation "androidx.work:work-runtime:2.8.1"
    implementation 'org.jetbrains:annotations:15.0'
}