apply plugin: 'scanner.published-library'

description 'Scanner provider for M3 bluetooth ring devices using the official 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.m3'
}

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

dependencies {
    implementation project(':enioka_scan')

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

    // Libs contains SDK. This lib has to be included as it is not provided by the device.
    if (gradle.ext.gpr != null) {
        compileOnly 'com.enioka.hc.external:m3-bt-driver:0.1.0'
    } else {
        compileOnly fileTree(dir: 'libs', include: ['*.jar'])
    }

    // 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'
}
