-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (83 loc) · 3.17 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.4.21'
androidx_fragment_version = "1.3.0"
livecycle_version = "2.3.0"
room_version = '2.3.0-beta02'//moving from 2.2.5 because -> https://issuetracker.google.com/issues/150106190
hilt_version = '2.31-alpha'
hilt_viewmodel_version = '1.0.0-alpha03'
coroutines_version = '1.4.2'
timber_version = '4.7.1'
security_crypto_version = '1.1.0-alpha03'//using this version to support api 21
nav_component_version="2.3.3"
swiperefreshlayout_version="1.1.0"
ok_http_version="4.9.0"
retrofit_version="2.9.0"
fresco_version="2.4.0"
fresco_imagepipeline_okhttp3_version="2.3.0"
//test
jacoco_version = '0.8.6'
junit_version = "4.13.2"
google_truth = "1.1.2"
android_junit_ext_version = "1.1.2"
mockk_version = "1.10.0"
robolectric_version = "4.5"
espresso_version = "3.3.0"
testcore_version = "1.3.0"
testRunner_version = "1.3.0"
mockwebserver_version = "4.9.0"
//analysis
ktlint_version = '0.40.0'
ktlint_gradle_version = '9.4.1'
}
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
// noinspection GradleDependency
classpath "com.android.tools.build:gradle:4.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_component_version"
classpath("org.jlleitschuh.gradle:ktlint-gradle:$ktlint_gradle_version")
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
// Task for caching the dependencies on circle-ci
task downloadDependencies() {
description 'Download all dependencies to the Gradle cache'
doLast {
configurations.findAll { it.canBeResolved }.files
}
}
// Task for showing the unit test result on command line
tasks.withType(Test) {
testLogging {
events "passed", "skipped", "failed"
afterSuite { desc, result ->
if (!desc.parent) {
def output = "Results: ${result.resultType} (${result.testCount} tests, " +
"${result.successfulTestCount} passed, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}