plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'org.jetbrains.kotlin.plugin.compose' version '2.1.0'
}

android {
    compileSdk 35

    namespace "de.webidsolutions.metaplugindemo"

    defaultConfig {
        applicationId "de.webidsolutions.metaplugindemo"
        minSdkVersion 28
        targetSdkVersion 35
        versionCode 1
        versionName "1.0.0"

        buildConfigField "String", "WEBID_DEMO_USERNAME_TEST", "\"${WEBID_DEMO_USERNAME_TEST}\""
        buildConfigField "String", "WEBID_DEMO_APIKEY_TEST",   "\"${WEBID_DEMO_APIKEY_TEST}\""
        buildConfigField "String", "WEBID_DEMO_USERNAME_PROD", "\"${WEBID_DEMO_USERNAME_PROD}\""
        buildConfigField "String", "WEBID_DEMO_APIKEY_PROD",   "\"${WEBID_DEMO_APIKEY_PROD}\""

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        buildConfig true
    }

    packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        jniLibs { useLegacyPackaging = true }
    }
}

dependencies {

    // android dependencies from demo app
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.compose.material3:material3:1.4.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    // webid product-plugin
    //noinspection GradleDependency

    def product_catalog_version = "21.1.1-a-SNAPSHOT"
    implementation ("de.webid-solutions:android_meta_plugin:$product_catalog_version") {
        changing = true
    }

    implementation ("de.webid-solutions:android_auto_ident_product_plugin:$product_catalog_version") {
        changing = true
    }
    implementation ("de.webid-solutions:android_pay_ident_product_plugin:$product_catalog_version") {
        changing = true
    }
    implementation ("de.webid-solutions:android_video_ident_product_plugin:$product_catalog_version") {
        changing = true
    }
    implementation ("de.webid-solutions:android_eid_product_plugin:$product_catalog_version") {
        changing = true
    }

    implementation("de.webid-solutions:android_document_scanner:20.3.0-SNAPSHOT")


    def composeBom = platform('androidx.compose:compose-bom:2025.11.00')
    implementation composeBom
    androidTestImplementation composeBom

    // Compose Core Dependencies
    implementation 'androidx.compose.ui:ui'
    implementation 'androidx.compose.ui:ui-graphics'
    implementation 'androidx.compose.ui:ui-tooling-preview'
    implementation 'androidx.compose.material3:material3'
    implementation 'androidx.activity:activity-compose:1.9.3'
    implementation 'androidx.compose.ui:ui-tooling-preview'
    debugImplementation 'androidx.compose.ui:ui-tooling'

}