/*
 * Copyright (c) 2015. Ncomz. All Rights Reserved
 */

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'


    defaultConfig {
        applicationId "com.ntels.kneet.v2"
        minSdkVersion 15
        targetSdkVersion 22
        multiDexEnabled true
        versionCode 10018
        versionName "1.0.3"
    }

    dexOptions {
        //preDexLibraries = false
        jumboMode = true
        javaMaxHeapSize "4g"
    }

    signingConfigs {
        release {
            storeFile file("../kneet_v2.jks")
            storePassword "ntels@kneet"
            keyAlias "kneet_v2"
            keyPassword "ntels@kneet"
        }
    }

    buildTypes {
        debug {
            debuggable true
        }
        release {
            signingConfig signingConfigs.release
            debuggable false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            applicationVariants.all { variant ->
                variant.outputs.each { output ->
                    def formattedDate = new Date().format("yyyyMMdd_HHmmss")
                    def apkName = "Kneet2.0_v" + variant.versionName + "_" + formattedDate + ".apk"
                    output.outputFile = new File(output.outputFile.parent, apkName)
                }
            }
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/dependencies'
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/jmdns-3.4.2.jar')
    //    compile 'com.github.bumptech.glide:glide:+'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:gridlayout-v7:23.1.1'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.google.zxing:core:3.2.1'
    compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
    compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
    compile 'jp.wasabeef:recyclerview-animators:2.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.tsengvn:Typekit:1.0.0'
    compile 'com.google.android.gms:play-services-ads:8.4.0'
    compile 'com.google.android.gms:play-services-identity:8.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
}
