apply plugin: 'com.android.library'

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

android {
    namespace "com.yoti.reactnative.docscan"

    compileSdk safeExtGet('compileSdkVersion', 35)

    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 24)
        targetSdkVersion safeExtGet('targetSdkVersion', 35)
        versionCode 700
        versionName "7.0.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        debug {
            matchingFallbacks = ['release']
        }
    }
    packagingOptions {
        exclude 'META-INF/*.kotlin_module'
        exclude "**/kotlin/**"
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
}

dependencies {
    implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
    implementation "com.yoti.mobile.android.sdk:yoti-sdk-core:${safeExtGet('yotiSdkVersion', '+')}"
}

allprojects {
    repositories {
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
    }
}
