apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.devtools.ksp'
apply plugin: 'kotlin-parcelize'

dependencies {
    api 'com.squareup.okhttp3:okhttp:4.9.2'
    implementation libs.kotlin.stdlib
    api 'com.github.owncloud:dav4android:oc_support_2.1.5'

    // Androidx
    implementation libs.androidx.core.ktx
    implementation libs.androidx.lifecycle.livedata.ktx
    implementation libs.androidx.annotation

    // Moshi
    implementation(libs.moshi.kotlin) {
        exclude module: "kotlin-reflect"
    }
    implementation 'org.apache.commons:commons-lang3:3.12.0'
    ksp libs.moshi.kotlin.codegen

    // Timber
    implementation libs.timber

    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.robolectric:robolectric:4.10'
    debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'

    // Detekt
    detektPlugins libs.detekt.formatting
    detektPlugins libs.detekt.libraries
}

android {
    compileSdkVersion sdkCompileVersion

    defaultConfig {
        minSdkVersion sdkMinVersion
        targetSdkVersion sdkTargetVersion
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.toString()
    }

    lint {
        abortOnError false
        ignoreWarnings true
    }

    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
    namespace 'com.owncloud.android.lib'
}
