apply plugin: 'com.android.library'

repositories {
    mavenLocal()
    mavenCentral()

    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25 // Updated to match compileSdkVersion
        versionCode 1
        versionName "1.0"
    }

    lintOptions {
        abortOnError false
        warningsAsErrors true // Updated: "warning" should be "warningsAsErrors"
        checkReleaseBuilds false // Added to avoid lint checking in release builds
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

dependencies {
    implementation "com.facebook.react:react-native:+"
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:25.3.1' // Updated to match compileSdkVersion
    implementation 'ai.api:sdk:2.0.7@aar'
    implementation 'com.google.code.gson:gson:2.8.8' // Updated version
    implementation 'commons-io:commons-io:2.11.0' // Updated version
    implementation('ai.api:libai:1.4.8') {
        exclude module: 'log4j-core'
    }
}
