apply plugin: 'com.android.library'

repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven { url "https://plugins.gradle.org/m2/" }
    jcenter()
}

android {
    namespace "app.alan.reactmodule"
    defaultConfig {
        compileSdkVersion 33
        minSdkVersion 26
        targetSdkVersion 33
        versionCode 2
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
}

rootProject.allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        maven { url "https://plugins.gradle.org/m2/" }
        jcenter()
        flatDir { 
            dirs "$rootDir/../node_modules/@alan-ai/alan-sdk-react-native/android/libs" 
        }
    }
}

dependencies {
    implementation (name: 'AlanSDK_4.26.0', ext: 'aar')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.facebook.react:react-native:+'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.github.yuriy-budiyev:code-scanner:2.3.2'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.github.bumptech.glide:glide:4.10.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}