build.gradle 2.3 KB
Newer Older
J
jessyan 已提交
1
apply plugin: 'com.android.application'
J
jessyan 已提交
2
apply plugin: 'me.tatarka.retrolambda'
J
jessyan 已提交
3 4 5 6 7 8

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]
    buildToolsVersion rootProject.ext.android["buildToolsVersion"]
    useLibrary 'org.apache.http.legacy'

J
jessyan 已提交
9 10 11 12 13
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }

J
jessyan 已提交
14 15 16 17 18 19 20 21 22
    defaultConfig {
        applicationId "me.jessyan.mvparms.demo"
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]
        testInstrumentationRunner rootProject.ext.dependencies["androidJUnitRunner"]
    }
    buildTypes {
J
jessyan 已提交
23 24 25

        debug {
            buildConfigField "boolean", "LOG_DEBUG", "true"
J
jessyan 已提交
26
            buildConfigField "boolean", "USE_CANARY", "true"
J
jessyan 已提交
27 28 29 30
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

J
jessyan 已提交
31
        release {
J
jessyan 已提交
32 33
            buildConfigField "boolean", "LOG_DEBUG", "false"
            buildConfigField "boolean", "USE_CANARY", "false"
J
jessyan 已提交
34
            minifyEnabled true
J
jessyan 已提交
35
            shrinkResources true
J
jessyan 已提交
36
            zipAlignEnabled true
J
jessyan 已提交
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        disable 'InvalidPackage'
        disable "ResourceType"
        abortOnError false
    }
}

buildscript {
    repositories {
        jcenter()
    }
}


dependencies {
J
jessyan 已提交
56
    compile fileTree(include: ['*.jar'], dir: 'libs')
J
jessyan 已提交
57
    //tools
J
jessyan 已提交
58
    provided rootProject.ext.dependencies["javax.annotation"]
J
jessyan 已提交
59 60 61 62 63
    annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
    //view
    annotationProcessor rootProject.ext.dependencies["butterknife-compiler"]
    compile rootProject.ext.dependencies["paginate"]
    //arms
J
jessyan 已提交
64 65
//    compile project(':arms')
    compile 'me.jessyan:arms:1.2.5'
J
jessyan 已提交
66 67
    //test
    testCompile rootProject.ext.dependencies["junit"]
J
jessyan 已提交
68 69 70
    debugCompile rootProject.ext.dependencies["canary-debug"]
    releaseCompile rootProject.ext.dependencies["canary-release"]
    testCompile rootProject.ext.dependencies["canary-release"]
J
jessyan 已提交
71
}