apply plugin: 'com.android.application'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    defaultConfig {
        applicationId "com.xxfc.rv"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        versionCode 132
        versionName "1.3.2"
        multiDexEnabled true

        //新版Gradle 是 implementation 为了兼容compile,写上这句话
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath = true
            }
        }

        compileOptions {

            sourceCompatibility JavaVersion.VERSION_1_8

            targetCompatibility JavaVersion.VERSION_1_8

        }
    }
    signingConfigs {
        release {
            keyAlias rootProject.ext.sign_xinxin.keyAlias
            keyPassword rootProject.ext.sign_xinxin.keyPassword
            storeFile file(rootProject.ext.sign_xinxin.storeReleaseFile)
            storePassword rootProject.ext.sign_xinxin.storePassword
        }
        debug {
            keyAlias 'xinxin'
            keyPassword '123456'
            storeFile file('../keystore/xinxin.jks')
            storePassword '123456'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            signingConfig signingConfigs.debug
        }

        android.applicationVariants.all { variant ->
            variant.outputs.all {
                //MedicalClient_{time}_v1.0.1_{build号}.apk
                if (variant.buildType.name == 'release') {
                    def productVersion = "RV" + releaseTime() + "V" + defaultConfig.versionName + "Release" + ".apk";
                    outputFileName = productVersion
                }
            }
        }

    }
}
//打包的时间
static def releaseTime() {
    return new Date().format("yyyyMMddHHss", TimeZone.getTimeZone("GMT+8"))
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    api 'com.jakewharton:butterknife:9.0.0-rc1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    //    api project(path: ':RvTravel')
    api project(':component_resource')
    api project(path: ':module_home')
    api project(path: ':module_mine')
    api project(path: ':module_camp')
    api project(path: ':module_tourism')
    api project(path: ':module_discovery')
}
