apply plugin: 'scanner.published-library'

description 'Scanner provider for Zebra devices using the official Zebra/Symbol drivers (not provided)'

android {
    compileSdk 34
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lint {
        disable 'ExpiredTargetSdkVersion'
    }
    namespace 'com.enioka.scanner.sdk.zebra'
}

ext {
    mavenArtifactId = "provider-cs-zebra"
}

repositories {
    maven {
        name = "zebra"
        url = "https://zebratech.jfrog.io/artifactory/EMDK-Android/"
    }
}


dependencies {
    // We need the APIs
    implementation project(':enioka_scan')

    // Linter helpers
    implementation 'com.android.support:support-annotations:28.0.0'

    // Libs contains Zebra BT SDK (barcode_scanner_library_vX.X.X.X.aar).
    if (gradle.ext.gpr != null) {
        compileOnly 'com.enioka.hc.external:zebra-bt-driver:2.5.1'
    } else {
        compileOnly fileTree(dir: 'libs', include: ['*.aar'])
    }

    // Symbol/Zebra EMDK is actually provided by the platform, so exclude from run path
    compileOnly 'com.symbol:emdk:9.1.1'

    // Test things (useless for now)
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testImplementation 'junit:junit:4.13.2'
}
