-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
196 lines (161 loc) · 5.66 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
buildscript {
repositories {
jcenter()
maven { url 'http://dl.bintray.com/kaleidos/maven' }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'net.kaleidos.gradle.plugins:emerger:0.0.2'
classpath 'io.fabric.tools:gradle:1.21.6'
}
}
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.android.application'
apply plugin: 'groovyx.android'
apply plugin: 'com.neenbedankt.android-apt' // must be after groovy plugin
//apply plugin: 'net.kaleidos.gradle.plugins.emerger'
apply plugin: 'io.fabric'
apply from: "$rootDir/gradle/signing.gradle"
apply from: "$rootDir/gradle/extraAndroidTasks.gradle"
ext {
groovyVersion = '2.4.7'
spockVersion = '1.0-groovy-2.4'
retrofitVersion = '2.0.0-beta4'
rxJavaVersion = '1.1.1'
rxAndroidVersion = '1.1.0'
androidSupportVersion = '24.0.0'
}
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName '1.0.0'
multiDexEnabled = true
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file("$keystorePath")
storePassword "$keystorePassword"
keyAlias "$storeKeyAlias"
keyPassword "$aliasKeyPassword"
}
}
buildTypes {
debug {
applicationIdSuffix '.dev'
minifyEnabled false
signingConfig signingConfigs.debug
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
textReport true
textOutput 'stdout'
warning 'InvalidPackage' // lint sees references in the grooid jar to unavailable java classes
}
dexOptions {
javaMaxHeapSize '4G'
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/services/org.codehaus.groovy.runtime.ExtensionModule'
exclude 'META-INF/services/org.codehaus.groovy.transform.ASTTransformation'
}
}
androidGroovy {
// setup custom groovy compile options
options {
configure(groovyOptions) {
javaAnnotationProcessing = true
configurationScript = file("$projectDir/config/groovy-compile-options.groovy")
}
}
// skip javac MUST be false for not set for apt to work correctly
}
dependencies {
compile(project(":extensions")) {
exclude group: 'org.codehaus.groovy'
}
compile "org.codehaus.groovy:groovy:$groovyVersion:grooid"
compile 'com.android.support:multidex:1.0.1'
compile 'com.arasthel:swissknife:1.4.0'
compile "com.android.support:support-v4:$androidSupportVersion"
compile "com.android.support:appcompat-v7:$androidSupportVersion"
compile "com.android.support:recyclerview-v7:$androidSupportVersion"
compile "com.android.support:design:$androidSupportVersion"
compile "com.android.support:support-annotations:$androidSupportVersion"
compile 'com.squareup.dagger:dagger:1.2.2'
apt 'com.squareup.dagger:dagger-compiler:1.2.2'
compile "io.reactivex:rxjava:$rxJavaVersion"
compile "io.reactivex:rxandroid:$rxAndroidVersion"
compile 'com.squareup.okhttp3:okhttp:3.1.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.1'
compile "com.squareup.retrofit2:retrofit:$retrofitVersion"
compile "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
compile "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.0'
compile 'com.jakewharton.timber:timber:4.0.1'
compile 'com.jakewharton.byteunits:byteunits:0.9.1'
compile 'com.jakewharton.threetenabp:threetenabp:1.0.2'
compile 'com.andrewreitz.velcro:velcro-betterviewanimator:1.0.1@aar'
releaseCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true
}
debugCompile 'com.facebook.stetho:stetho:1.3.1'
debugCompile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
debugCompile 'com.facebook.stetho:stetho-timber:1.3.1@aar'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
androidTestCompile 'com.andrewreitz:spock-android:1.2.1'
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile "org.spockframework:spock-core:$spockVersion"
testCompile 'org.robospock:robospock:1.0.0'
}
configurations.all {
resolutionStrategy.force "com.android.support:support-annotations:$androidSupportVersion"
resolutionStrategy.force 'org.codehaus.groovy:groovy:2.4.5:grooid'
resolutionStrategy.force 'junit:junit:4.12'
}
// APT doesn't know to make these directories for tests. Force them to
// be written.
afterEvaluate {
def createAptTestDirs = tasks.create('createAptTestDirs')
createAptTestDirs.doFirst {
file("$buildDir/generated/source/apt/test/debug").mkdirs()
file("$buildDir/generated/source/apt/test/release").mkdirs()
}
tasks.getByName('mockableAndroidJar').finalizedBy(createAptTestDirs)
}
tasks.withType(Test) {
testLogging {
exceptionFormat 'full'
}
}