apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'

android {
    namespace 'com.kunzisoft.keepass.database'
    compileSdkVersion 36

    defaultConfig {
        minSdkVersion 19
        targetSdk 35

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_17
        sourceCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = "17"
    }

    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }

    packaging {
        // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685
        resources.pickFirsts.add('META-INF/versions/9/OSGI-INF/MANIFEST.MF')
    }
}

dependencies {
    // Time
    implementation 'joda-time:joda-time:2.13.0'
    // Apache Commons
    implementation 'commons-io:commons-io:2.8.0'
    implementation 'commons-codec:commons-codec:1.15'

    api project(path: ':crypto')

    // Tests
    androidTestImplementation "androidx.test:runner:$android_test_version"
    testImplementation "androidx.test:runner:$android_test_version"
}
