// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
// SPDX-License-Identifier: BUSL-1.1
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.

// Mobile SDK Alpha - Bill of Materials (BOM)
// This file provides all required dependencies for the mobile-sdk-alpha AAR
// Usage: apply from: 'path/to/mobile-sdk-alpha-bom.gradle'

// Enable ViewBinding in the consuming app
android {
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    // Mobile SDK Alpha AAR
    // Detect if we're in monorepo or published package
    def sdkRoot = file("$projectDir/../../../mobile-sdk-alpha").exists() ?
        "$projectDir/../../../mobile-sdk-alpha" : // Monorepo (workspace dependency)
        "$projectDir/../../node_modules/@selfxyz/mobile-sdk-alpha" // Published package

    implementation files("${sdkRoot}/dist/android/mobile-sdk-alpha-release.aar")

    // All required dependencies for mobile-sdk-alpha AAR

    // Core JMRTD library for passport reading
    implementation 'org.jmrtd:jmrtd:0.7.35'
    implementation 'net.sf.scuba:scuba-sc-android:0.0.23'

    // Cryptography libraries
    implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
    implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1'

    // Utility libraries
    implementation 'commons-io:commons-io:2.11.0'
    implementation 'com.squareup.okhttp3:okhttp:4.12.0'
    implementation 'com.google.code.gson:gson:2.10.1'

    // ML Kit for text recognition
    implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.2'
    implementation 'com.google.mlkit:text-recognition:16.0.0'

    // Camera functionality
    implementation "com.github.fotoapparat:fotoapparat:2.7.0"
    implementation "androidx.camera:camera-core:1.3.2"
    implementation "androidx.camera:camera-camera2:1.3.2"
    implementation "androidx.camera:camera-lifecycle:1.3.2"
    implementation "androidx.camera:camera-view:1.3.2"

    // Android support libraries
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'com.google.android.material:material:1.9.0'

    // Reactive programming
    implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

    // Additional utilities
    implementation 'com.google.guava:guava:31.1-android'
    implementation 'com.github.mhshams:jnbis:2.0.2'
}
