-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
111 lines (98 loc) · 3.09 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import GradleTasks.ANALYZE_CODE_TASK
import GradleTasks.CLEAN_TASK
import GradleTasks.DETEKT_AUTO_CORRECT_TASK
import GradleTasks.DETEKT_TASK
import com.android.build.gradle.tasks.LintGlobalTask
buildscript {
repositories {
google()
jcenter()
//maven(url = "http://s2.appsfactory.de/APPSfactory/Maven" )
maven(url = uri("https://plugins.gradle.org/m2/"))
}
dependencies {
classpath(GradleBuildPlugins.gradle)
classpath(GradleBuildPlugins.kotlin)
classpath(GradleBuildPlugins.Jacoco.classPath)
//classpath(GradleBuildPlugins.afResGen)
classpath(GradleBuildPlugins.navigation)
classpath(GradleBuildPlugins.appBadge)
classpath(GradleBuildPlugins.firebase)
classpath(GradleBuildPlugins.koin)
classpath(GradleBuildPlugins.kotlinSerialization)
classpath(GradleBuildPlugins.sqlDelight)
classpath(GradleBuildPlugins.kotlin)
}
}
allprojects {
repositories {
google()
jcenter()
maven(url = "https://dl.bintray.com/kotlin/kotlinx")
maven(url = "https://jitpack.io")
// maven(url = "http://s2.appsfactory.de/APPSfactory/Maven")
// maven(url = "http://oss.jfrog.org/artifactory/oss-snapshot-local")
maven(url = "https://kotlin.bintray.com/kotlinx/")
}
}
plugins {
id(GradleBuildPlugins.Jacoco.plugin) version GradleBuildPlugins.Jacoco.version
id(GradleBuildPlugins.Detekt.plugin) version GradleBuildPlugins.Detekt.version
kotlin("jvm") version "1.4.32"
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
junitJacoco {
jacocoVersion = "0.8.5"
ignoreProjects
excludes
includeNoLocationClasses = false
includeInstrumentationCoverageInMergedReport = false
}
detekt {
config.setFrom(files("$projectDir/config/detekt/config.yml"))
buildUponDefaultConfig = true
parallel = true
reports {
html.enabled = false
xml.enabled = true
txt.enabled = false
}
}
subprojects {
apply(plugin = GradleBuildPlugins.Detekt.plugin)
detekt { ignoreFailures = true }
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class)
.configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
tasks.withType(LintGlobalTask::class.java, closureOf<LintGlobalTask> {
tasks.findByName(ANALYZE_CODE_TASK)?.dependsOn(
this, tasks.named(DETEKT_TASK)
)
})
}
task<DefaultTask>(name = ANALYZE_CODE_TASK) {
group = "verification"
description = "Runs code analyzers"
}
task<io.gitlab.arturbosch.detekt.Detekt>(name = DETEKT_AUTO_CORRECT_TASK) {
description = "Runs a fail fast detekt build."
config.setFrom(files("$projectDir/config/detekt/config.yml"))
source = fileTree(projectDir)
debug = true
parallel = true
buildUponDefaultConfig = true
autoCorrect = true
ignoreFailures = true
reports {
html.enabled = true
}
include("**/*.kt")
include("**/*.kts")
exclude("**/resources/**")
exclude("**/build/**")
}