apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
    compileSdk 35
    buildToolsVersion '34.0.0'

    defaultConfig {
        applicationId "com.ds.avare"
        minSdkVersion 20
        targetSdk 35// android 5 is minimum
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    dependencies {
    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    lintOptions {
        abortOnError false // for Travis CI
    }

    testOptions {
        unitTests.returnDefaultValues = true

        unitTests {
                includeAndroidResources = true
        }
    }
    useLibrary 'android.test.mock'
    namespace 'com.ds.avare'

    applicationVariants.all { variant ->
        def productFlavor = variant.productFlavors[0] != null ? "${variant.productFlavors[0].name.capitalize()}" : ""
        def buildType = "${variant.buildType.name.capitalize()}"
        tasks["compile${productFlavor}${buildType}UnitTestSources"].dependsOn(tasks["merge${productFlavor}${buildType}Assets"])
    }
}

dependencies {
    implementation 'org.xmlunit:xmlunit-core:2.3.0'
    implementation 'oro:oro:2.0.8'
    implementation 'org.xmlunit:xmlunit-matchers:2.3.0'
    implementation 'androidx.core:core:1.3.2'
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
    implementation 'com.github.mik3y:usb-serial-for-android:3.4.6'
    implementation 'androidx.exifinterface:exifinterface:1.3.7'
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:4.8.1'
    testImplementation 'org.powermock:powermock-module-junit4:1.7.0RC2'
    testImplementation 'org.powermock:powermock-api-mockito2:1.7.0RC2'
    testImplementation 'org.powermock:powermock-classloading-xstream:1.7.0RC2'
    testImplementation 'org.powermock:powermock-module-junit4-rule:1.7.0RC2'
    testImplementation 'org.json:json:20220924'
}
