apply plugin: 'com.android.application'

def getDate() {
    def date = new Date()
    def formattedDate = date.format('yyyyMMddHHmm')
    return formattedDate
}

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.2'

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 29
        versionName "1.0.6"
        renderscriptTargetApi 18
        multiDexEnabled false
    }

    buildTypes {
        debug {

        }
        release {
            // minifyEnabled = false
        }
    }

    dexOptions {
        // incremental true
        preDexLibraries true
    }

    productFlavors {
        production {
            versionName defaultConfig.versionName + "-" + getDate()
        }
        dogfood {
            versionName defaultConfig.versionName + "-dogfood-" + getDate()
        }
        dev_xplod {
            versionName defaultConfig.versionName + "-dev-xplod-" + getDate()
        }
        tv {
            versionName defaultConfig.versionName + "-tv-" + getDate()
            minSdkVersion 17
        }
    }

    sourceSets.main {
        jniLibs.srcDir 'src/main/libs'
        jni.srcDirs = []
    }
}

dependencies {
    compile project(':providerlib')
    compile files('src/main/libs/jEN.jar')
    compile files('src/main/libs/json_simple-1.1.jar')
    compile files('src/main/libs/calligraphy-1.1.0.jar')
    compile ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.9.3@aar'){
        transitive=true
    }
    compile 'com.joshdholtz.sentry:sentry-android:1.4.4'
    compile 'com.google.android.gms:play-services-cast:9.4.0'
    compile 'com.android.support:support-v13:24.2.0'
    compile 'com.android.support:mediarouter-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.2.0'
    compile 'com.android.support:palette-v7:24.2.0'
    compile 'com.android.support:recyclerview-v7:24.2.0'
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.android.support:leanback-v17:24.2.0'
    compile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
}
