-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathbuild.gradle.kts
96 lines (83 loc) · 3.22 KB
/
build.gradle.kts
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
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:7.4.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
classpath("com.google.dagger:hilt-android-gradle-plugin:2.38.1")
classpath("com.karumi:shot:5.13.0")
}
}
plugins {
id("nl.neotech.plugin.rootcoverage") version "1.6.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
}
allprojects {
repositories {
google()
jcenter()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
mavenCentral()
}
}
task("clean") {
delete(rootProject.buildDir)
}
rootCoverage {
// The default build variant for every module
buildVariant = "debug"
// Class & package exclude patterns
excludes = listOf(
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Module.*", // Modules for Hilt.
"**/*Hilt*.*,", // Hilt auto-generated code.
"**/Hilt_*.*,", // Hilt auto-generated code.
"**/_HiltComponents_*.*,", // Hilt auto-generated code.
"**/_HiltComponents.*.*,", // Hilt auto-generated code.
"**/Hilt_*.*,", // Hilt auto-generated code.
"**/*_GeneratedInjector.*,", // Hilt auto-generated code.
"**/*InjectInterface.*,", // Hilt auto-generated code.
"**/hilt_aggregated_deps/*,", // Hilt auto-generated code.
"**/*hilt_aggregated_deps*",
"**/*MembersInjector*.*", // Hilt auto-generated code.
"**/*_Provide*Factory*.*",
"**/*_Factory.*", //Hilt auto-generated code
"**/*_Factory.InstanceHolder.*", //Hilt auto-generated code
"**/codegen/*.*", //Hilt auto-generated code
"**/*$*$*.*", // Anonymous classes generated by kotlin
"**/*Directions.*", // Nav args generated code
//add libraries
"android/**/*.*",
"androidx/**/*.*",
"io/**/*.*",
//remove what we don't test
"androidTest/**/*.*",
"test/**/*.*",
"**/prieto/fernando/spacex/theme/**",
"**/prieto/fernando/spacex/presentation/screens/**",
"**/prieto/fernando/spacex/",
"**/prieto/fernando/spacex/presentation/navigation/"
)
// Since 1.1 generateHtml is by default true
generateCsv = false
generateHtml = true
generateXml = true
// Since 1.2: When false the plugin does not execute any tests, useful when you run the tests manually or remote (Firebase Test Lab)
executeTests = true
// Since 1.2: Same as executeTests except that this only affects the instrumented Android tests
executeAndroidTests = false
// Since 1.2: Same as executeTests except that this only affects the unit tests
executeUnitTests = true
// Since 1.2: When true include results from instrumented Android tests into the coverage report
includeAndroidTestResults = false
// Since 1.2: When true include results from unit tests into the coverage report
includeUnitTestResults = true
// Since 1.4: Sets jacoco.includeNoLocationClasses, so you don't have to. Helpful when using Robolectric
// which usually requires this attribute to be true
includeNoLocationClasses = true
}