apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.user.alarmandjob"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    signingConfigs {
        release {
            // default keystore file, PLZ config file path in local.properties
            Properties properties = new Properties()
            //加载本地local.properties文件
            if (rootProject.file('local.properties').exists()) {
                properties.load(rootProject.file("local.properties").newDataInputStream())
                if(properties.get("storeFile")!=null){
                    storeFile file(properties.get("storeFile"))
                    storePassword properties.get("storePassword")
                    keyAlias properties.get("keyAlias")
                    keyPassword properties.get("keyPassword")
                }
            }else if(System.getenv("FLOW_CERTIFICATE_FILE")!=null){
                storeFile file(System.getenv("FLOW_CERTIFICATE_FILE"))
                storePassword System.getenv("FLOW_KEYSTORE_PASS")
                keyAlias System.getenv("FLOW_ALIAS_NAME")
                keyPassword System.getenv("FLOW_ALIAS_PASS")
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation project(':autostart')
}
