|
| 1 | +apply plugin: 'com.android.application' |
| 2 | +apply plugin: 'me.tatarka.retrolambda' |
| 3 | +apply plugin: 'com.neenbedankt.android-apt' |
| 4 | +apply plugin: 'android-git-sha' |
| 5 | +apply from: '../config/quality/quality.gradle' |
| 6 | + |
| 7 | +def versionMajor = 0 |
| 8 | +def versionMinor = 0 |
| 9 | +def versionPatch = 1 |
| 10 | +def versionBuild = 0 |
| 11 | + |
| 12 | +android { |
| 13 | + compileSdkVersion rootProject.ext.compileSdkVersion |
| 14 | + buildToolsVersion rootProject.ext.buildToolsVersion |
| 15 | + |
| 16 | + compileOptions { |
| 17 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 18 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 19 | + } |
| 20 | + |
| 21 | + defaultConfig { |
| 22 | + applicationId "com.starter" |
| 23 | + minSdkVersion rootProject.ext.minSdkVersion |
| 24 | + targetSdkVersion rootProject.ext.targetSdkVersion |
| 25 | + versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild |
| 26 | + versionName "${versionMajor}.${versionMinor}.${versionPatch}" |
| 27 | + |
| 28 | + buildConfigField "String", "API_BASE_URL", "\"https://api.github.com\"" |
| 29 | + |
| 30 | + testInstrumentationRunner "${applicationId}.StarterTestRunner" |
| 31 | + vectorDrawables.useSupportLibrary = true |
| 32 | + } |
| 33 | + |
| 34 | + buildTypes { |
| 35 | + release { |
| 36 | + minifyEnabled true |
| 37 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 38 | + } |
| 39 | + |
| 40 | + debug { |
| 41 | + versionNameSuffix ".debug" |
| 42 | + debuggable true |
| 43 | + } |
| 44 | + } |
| 45 | + |
| 46 | + packagingOptions { |
| 47 | + exclude 'META-INF/services/javax.annotation.processing.Processor' |
| 48 | + exclude 'META-INF/LICENSE.txt' |
| 49 | + exclude 'META-INF/NOTICE.txt' |
| 50 | + exclude 'META-INF/notice.txt' |
| 51 | + exclude 'META-INF/license.txt' |
| 52 | + exclude 'META-INF/maven/com.google.guava/guava/pom.properties' |
| 53 | + exclude 'META-INF/maven/com.google.guava/guava/pom.xml' |
| 54 | + } |
| 55 | + |
| 56 | + dexOptions { |
| 57 | + preDexLibraries = true |
| 58 | + maxProcessCount 8 |
| 59 | + javaMaxHeapSize "6g" |
| 60 | + } |
| 61 | + |
| 62 | + testOptions { |
| 63 | + unitTests.returnDefaultValues = true |
| 64 | + } |
| 65 | + |
| 66 | + testOptions.unitTests.all { |
| 67 | + testLogging { |
| 68 | + events 'passed', 'skipped', 'failed', 'standardOut', 'standardError' |
| 69 | + outputs.upToDateWhen { false } |
| 70 | + showStandardStreams = true |
| 71 | + } |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +gitSha { |
| 76 | + buildTypeMatcher = 'release' // RegExp to specify the build type |
| 77 | + flavorMatcher = 'inner|fortest' // RegExp to specify the flavor |
| 78 | + abortIfGitDirty = true // whether abort build if the current git branch is dirty |
| 79 | +} |
| 80 | + |
| 81 | +dependencies { |
| 82 | + compile fileTree(dir: 'libs', include: ['*.jar']) |
| 83 | + |
| 84 | + testCompile 'junit:junit:4.12' |
| 85 | + androidTestCompile 'com.android.support.test:runner:0.5' |
| 86 | + androidTestCompile 'com.android.support.test:rules:0.5' |
| 87 | + androidTestCompile "com.android.support.test.espresso:espresso-intents:$rootProject.ext.espressoVersion" |
| 88 | + androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion" |
| 89 | + androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') { |
| 90 | + exclude group: 'com.android.support', module: 'appcompat' |
| 91 | + exclude group: 'com.android.support', module: 'support-v4' |
| 92 | + exclude module: 'recyclerview-v7' |
| 93 | + } |
| 94 | + androidTestCompile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" |
| 95 | + androidTestCompile "com.android.support:design:$rootProject.ext.supportLibraryVersion" |
| 96 | + androidTestCompile "com.android.support:support-annotations:$rootProject.ext.supportLibraryVersion" |
| 97 | + androidTestCompile "org.hamcrest:hamcrest-core:$rootProject.ext.hamcrestVersion" |
| 98 | + androidTestCompile "org.hamcrest:hamcrest-integration:$rootProject.ext.hamcrestVersion" |
| 99 | + androidTestCompile "org.hamcrest:hamcrest-library:$rootProject.ext.hamcrestVersion" |
| 100 | + androidTestCompile "com.google.dexmaker:dexmaker-mockito:$rootProject.ext.dexmakerVersion" |
| 101 | + androidTestCompile "com.google.dexmaker:dexmaker:$rootProject.ext.dexmakerVersion" |
| 102 | + androidTestCompile 'org.mockito:mockito-core:1.9.5' |
| 103 | + androidTestCompile 'com.github.andrzejchm.RESTMock:android:0.1.4' |
| 104 | + androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' |
| 105 | + |
| 106 | + // android stuff |
| 107 | + compile "com.android.support:support-v4:$rootProject.ext.supportLibraryVersion" |
| 108 | + compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" |
| 109 | + compile "com.android.support:support-annotations:$rootProject.ext.supportLibraryVersion" |
| 110 | + compile "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion" |
| 111 | + compile "com.android.support:design:$rootProject.ext.supportLibraryVersion" |
| 112 | + compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion" |
| 113 | + compile 'com.android.support.constraint:constraint-layout:1.0.0-beta2' |
| 114 | + |
| 115 | + compile "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofitVersion" |
| 116 | + compile "com.squareup.retrofit2:converter-gson:$rootProject.ext.retrofitVersion" |
| 117 | + compile "com.squareup.retrofit2:adapter-rxjava:$rootProject.ext.retrofitVersion" |
| 118 | + compile "com.squareup.okhttp3:logging-interceptor:$rootProject.ext.okHttpVersion" |
| 119 | + compile "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion" |
| 120 | + compile "com.squareup.picasso:picasso:$rootProject.ext.picassoVersion" |
| 121 | + |
| 122 | + compile 'com.jakewharton.timber:timber:4.1.2' |
| 123 | + compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2' |
| 124 | + compile "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion" |
| 125 | + apt "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion" |
| 126 | + |
| 127 | + apt "com.google.dagger:dagger-compiler:$rootProject.ext.daggerVersion" |
| 128 | + compile "com.google.dagger:dagger:$rootProject.ext.daggerVersion" |
| 129 | + compile 'com.google.code.gson:gson:2.7' |
| 130 | + compile 'org.glassfish:javax.annotation:10.0-b28' |
| 131 | + |
| 132 | + compile "io.reactivex:rxjava:$rootProject.ext.rxVersion" |
| 133 | + compile "io.reactivex:rxandroid:$rootProject.ext.rxVersion" |
| 134 | + |
| 135 | + compile 'com.github.promeg:android-git-sha-lib:1.0.0' |
| 136 | + |
| 137 | + compile 'com.facebook.stetho:stetho:1.3.0' |
| 138 | + compile 'com.facebook.stetho:stetho-okhttp3:1.3.0' |
| 139 | +} |
0 commit comments