-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
143 lines (119 loc) · 5.67 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
subprojects { project ->
repositories {
jcenter()
}
apply plugin: 'checkstyle'
checkstyle {
configFile = new File(rootDir, 'config/checkstyle.xml')
configProperties.checkStyleConfigDir = new File(rootDir, 'config')
}
task checkstyle(type: Checkstyle) {
source 'src'
include '**/*.java'
exclude '**/gen/**'
// empty classpath
classpath = files()
}
task findbugs(type: FindBugs) {
description 'Run findbugs'
group 'verification'
classes = fileTree('build/intermediates/classes/debug/')
source = fileTree('src/main/java')
classpath = files()
effort = 'max'
excludeFilter = new File(rootDir, 'config/findbugs-exclude.xml')
reports {
xml.enabled = false
html.enabled = true
}
}
afterEvaluate {
if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle', 'findbugs')
}
}
/* gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
if (!name.contains('Test')) {
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
}
}
}*/
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
libraries =
[
javax : "org.glassfish:javax.annotation:${JAVAX_VERSION}",
rxjava_android : "io.reactivex:rxandroid:${RX_ANDROID_VERSION}",
rxjava : "io.reactivex:rxjava:${RX_JAVA_VERSION}",
appcompat : "com.android.support:appcompat-v7:${SUPPORT_VERSION}",
android_support : [
"com.android.support:support-v4:${SUPPORT_VERSION}",
],
android_support_design: "com.android.support:design:${SUPPORT_VERSION}",
retrofit : "com.squareup.retrofit2:retrofit:${RETROFIT_VERSION}",
play_services_auth : "com.google.android.gms:play-services-auth:${PLAY_SERVICES_VERSION}",
dagger_compiler : "com.google.dagger:dagger-compiler:${DAGGER_VERSION}",
dagger : "com.google.dagger:dagger:${DAGGER_VERSION}",
dagger_javax : "javax.annotation:jsr250-api:${DAGGER_JAVAX_VERSION}",
guava : "com.google.guava:guava:${GUAVA_VERSION}",
gson : "com.google.code.gson:gson:${GSON_VERSION}",
streams : "com.annimon:stream:${STREAMS_VERSION}",
unit_test : [
"junit:junit:${JUNIT_VERSION}",
dependencies.create("org.robolectric:robolectric:${ROBOLECTRIC_VERSION}") {
exclude module: 'classworlds'
exclude module: 'maven-artifact'
exclude module: 'maven-artifact-manager'
exclude module: 'maven-error-diagnostics'
exclude module: 'maven-model'
exclude module: 'maven-plugin-registry'
exclude module: 'maven-profile'
exclude module: 'maven-project'
exclude module: 'maven-settings'
exclude module: 'nekohtml'
exclude module: 'plexus-container-default'
exclude module: 'plexus-interpolation'
exclude module: 'plexus-utils'
exclude module: 'wagon-file'
exclude module: 'wagon-http-lightweight'
exclude module: 'wagon-http-shared'
exclude module: 'wagon-provider-api'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'commons-logging'
exclude group: 'org.apache.httpcomponents'
},
"org.mockito:mockito-all:${MOCKITO_VERSION}",
dependencies.create("com.squareup.assertj:assertj-android:${ASSERTJ_ANDROID_VERSION}") {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
},
dependencies.create("com.squareup.assertj:assertj-android-support-v4:${ASSERTJ_ANDROID_SUPPORT_V4_VERSION}") {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
},
"org.assertj:assertj-core:${ASSERTJ_CORE_VERSION}"
]
]
}