apply plugin: 'com.android.application'
android {
    aaptOptions {
        cruncherEnabled = false
        useNewCruncher = false
    }
    signingConfigs {
        compileSdkVersion 28
        buildToolsVersion "28.0.2"
        release {
            keyAlias 'biubike'
            keyPassword 'bikeup'
            storeFile file('biubike.jks')
            storePassword 'bikeup'
        }
        defaultConfig {
            applicationId "com.biubike"
            minSdkVersion 21
            targetSdkVersion 28
            versionCode 220
            versionName "2.2.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
        }

        lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }

    }
    buildTypes {
        debug {
            signingConfig signingConfigs.release

        }
        release {
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable false
            zipAlignEnabled true
            shrinkResources true
            minifyEnabled true

            applicationVariants.all { variant ->
                variant.outputs.all {
                    def fileName = "Biubike" + "_V${defaultConfig.versionName}(${defaultConfig.versionCode})_" +
                            variant.name +
                            ".apk"
                    outputFileName = fileName
                }
            }

        }
    }

}

def releaseTime() {
    return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation files('libs/baidumapapi_base_v4_1_1.jar')
    implementation files('libs/baidumapapi_map_v4_1_1.jar')
    implementation files('libs/nineoldandroids-2.4.0.jar')
    implementation files('libs/baidumapapi_util_v4_1_1.jar')
    implementation files('libs/gson-2.2.1.jar')
    implementation files('libs/BaiduNaviSDK_3.2.0.jar')
    implementation files('libs/Msc.jar')
    implementation files('libs/Msc.jar')
    implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
    implementation 'com.jcodecraeer:xrecyclerview:1.5.9'
    implementation 'org.greenrobot:eventbus:3.1.1'

}

