forked from concretesolutions/desafio-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
144 lines (113 loc) · 3.74 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
apply from: "$rootDir/tools/jacoco-unified.gradle"
buildscript {
ext.kotlin_version = '1.2.71'
ext.android_plugin_version = '3.2.0'
extensions.jacocoVersion = '0.8.2'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$android_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jacoco:org.jacoco.core:$jacocoVersion"
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
subprojects {
apply from: "$rootDir/tools/jacoco.gradle"
apply from: "$rootDir/tools/ktlint.gradle"
apply from: "$rootDir/tools/unit-test.gradle"
apply from: "$rootDir/tools/instrumented-test.gradle"
afterEvaluate {
if (!project.hasProperty("android")) return
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
resConfigs "en"
}
lintOptions {
checkReleaseBuilds true
abortOnError true
ignoreWarnings false
absolutePaths false
warningsAsErrors false
htmlOutput file("$rootDir/build/reports/html/$name-lint.html")
xmlOutput file("$rootDir/build/reports/xml/$name-lint.xml")
}
aaptOptions {
cruncherEnabled = false
}
testOptions {
unitTests.includeAndroidResources true
unitTests.returnDefaultValues = true
animationsDisabled true
}
packagingOptions {
exclude 'META-INF/LICENSE'
pickFirst 'protobuf.meta'
doNotStrip '*/mips/*.so'
doNotStrip '*/mips64/*.so'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
androidTest.resources.srcDirs += 'src/androidTest/res'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dependencies {
ktlint "com.github.shyiko:ktlint:$versions.ktLint"
}
}
}
}
ext.versions = [
// Android
androidSupport : '28.0.0',
constraintLayout: '1.1.3',
// Google
gson : '2.8.5',
// Lint
ktLint : '0.27.0',
// GreenRobot
eventbus : '3.1.1',
// Square
picasso : '2.5.2',
okHttp : '3.11.0',
retrofit : '2.4.0',
timber : '4.7.1',
// Android Arch
arch : '1.1.1',
// Arch Toolkit
statemachine : '0.0.10',
recycler_adapter: '0.0.6',
// Test
espresso : '3.0.2',
mockito : '2.11.0',
robolectric : '3.8',
hamcrest : '1.3',
junit : '4.12',
rules : '1.0.2',
runner : '1.0.2',
kappuccino : '1.2.0',
mirror : '1.6',
uiAutomator : '2.1.3'
]
task clean(type: Delete) {
delete rootProject.buildDir
}