apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "org.calyxos.backup.contacts"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        testInstrumentationRunnerArguments disableAnalytics: 'true'
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    testOptions {
        unitTests.returnDefaultValues = true
    }

    // optional signingConfigs
    // On userdebug builds, you can use the testkey here to update the system app
    def keystorePropertiesFile = project.file("keystore.properties")
    if (keystorePropertiesFile.exists()) {
        def keystoreProperties = new Properties()
        keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

        signingConfigs {
            release {
                keyAlias keystoreProperties['keyAlias']
                keyPassword keystoreProperties['keyPassword']
                storeFile file(keystoreProperties['storeFile'])
                storePassword keystoreProperties['storePassword']
            }
        }
        buildTypes.release.signingConfig = signingConfigs.release
        buildTypes.debug.signingConfig = signingConfigs.release
    }
}

def aospDeps = fileTree(include: [
        // out/target/common/obj/JAVA_LIBRARIES/com.android.vcard_intermediates/classes.jar
        'com.android.vcard.jar'
], dir: 'libs')

dependencies {
    implementation aospDeps

    testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    testImplementation "junit:junit:$junit4_version"
    testImplementation "io.mockk:mockk:$mockk_version"

    androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
    androidTestImplementation "io.mockk:mockk-android:$mockk_version"
}
