apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "org.mcopenplatform.muoapi"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 3
        versionName "3.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
			buildConfigField "boolean", "LOG_SHOW", "false"
            minifyEnabled false
			minifyEnabled true
            shrinkResources true
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            flavorDimensions "default"
        }
        debug {
			buildConfigField "boolean", "LOG_SHOW", "true"
            minifyEnabled false
			minifyEnabled false
            shrinkResources false
            zipAlignEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            flavorDimensions "default"
        }
        /*
		applicationVariants.all { variant ->
            variant.outputs.each { output ->
                project.ext { appName = 'MCOPAppVNUM' }
                def formattedDate = new Date().format('yyyyMMdd')
                def newName = output.outputFile.name
                //def newName = "${versionName}${formattedDate}"
                newName = newName.replace("app-", versionName) //"MyAppName" -> I set my app variables in the root project
                //newName = newName.replace("NUM", appNameVersion)
                newName = newName.replace("-release", formattedDate)
                newName = newName.replaceAll(' ', '');

                //noinspection GroovyAssignabilityCheck
                output.outputFile = new File(output.outputFile.parent, newName)
            }
        }
        */

    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }


}



dependencies {
    implementation project(':android-ngn-stack')
    api fileTree(include: ['*.jar'], dir: 'libs')
    api 'com.android.support.constraint:constraint-layout:1.0.2'
    api 'com.android.support:support-annotations:' + rootProject.supportLibVersion
    api 'com.android.support:appcompat-v7:' + rootProject.supportLibVersion
    api 'com.android.support:design:' + rootProject.supportLibVersion
    api 'com.android.support:cardview-v7:' + rootProject.supportLibVersion
    api 'com.android.support:support-v4:' + rootProject.supportLibVersion
    api 'com.android.support:recyclerview-v7:' + rootProject.supportLibVersion
    // Required -- JUnit 4 framework
    testImplementation 'junit:junit:4.12'
    // Optional -- Mockito framework
    testImplementation 'org.mockito:mockito-core:2.7.22'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
}