plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'org.jetbrains.kotlin.android'
}

android {
    compileSdk 36

    defaultConfig {
        minSdk 23
        targetSdk 34

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_19
        targetCompatibility JavaVersion.VERSION_19
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_19
    }
    namespace 'net.xzos.upgradeall.app.backup'
    
    packaging {
        resources {
            excludes += 'META-INF/DEPENDENCIES'
            excludes += 'META-INF/LICENSE'
            excludes += 'META-INF/LICENSE.txt'
            excludes += 'META-INF/NOTICE'
            excludes += 'META-INF/NOTICE.txt'
        }
    }
}

dependencies {

    implementation project(path: ':core')  // 数据库结构
    implementation project(path: ':core-utils')

    implementation "androidx.core:core-ktx:$android_ktx_version"
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'

    // Gson
    implementation 'com.google.code.gson:gson:2.13.2'

    // WebDav
    implementation ('com.github.thegrizzlylabs:sardine-android:0.9') {
        exclude module: 'stax'
        exclude module: 'stax-api'
        exclude module: 'xpp3'
    }
}