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

android {
    namespace 'com.kunzisoft.encrypt'
    compileSdkVersion 36
    ndkVersion "21.4.7075529"

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 35
        multiDexEnabled true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }

    externalNativeBuild {
        cmake {
            path "src/main/jni/CMakeLists.txt"
        }
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_17
        sourceCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = "17"
    }

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

dependencies {
    // Crypto
    implementation 'org.bouncycastle:bcpkix-jdk18on:1.81'

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