-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (83 loc) · 2.49 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import dependencies.Deps
buildscript {
repositories {
google()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath Deps.androidGradlePlugin
classpath Deps.Kotlin.gradlePlugin
classpath Deps.androidJunit5GradlePlugin
classpath Deps.ktlintGradlePlugin
classpath Deps.detektGradlePlugin
classpath Deps.scabbardGradlePlugin
classpath Deps.releaseHubGradlePlugin
classpath Deps.Hilt.gradlePlugin
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
}
}
}
subprojects {
pluginManager.withPlugin("kotlin-android") {
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "io.gitlab.arturbosch.detekt"
ktlint {
version = Deps.Ktlint.version
android = true
ignoreFailures = true
reporters {
reporter "checkstyle"
}
filter {
exclude("**/generated/**")
}
}
detekt {
config = files("$rootDir/config/detekt-config.yml")
buildUponDefaultConfig = true
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = false
txt.enabled = false
}
}
afterEvaluate {
if (System.getenv("CI") != "true") {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
it.dependsOn ktlintFormat
}
}
tasks.withType(io.gitlab.arturbosch.detekt.Detekt) {
exclude("**/generated/**")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: "com.releaseshub.gradle.plugin"
releasesHub {
dependenciesBasePath = "buildSrc/src/main/java/dependencies"
dependenciesClassNames = ["dependencies.kt"]
pullRequestEnabled = true
pullRequestsMax = 10
gitHubUserName = "watabee"
gitHubUserEmail = "[email protected]"
gitHubRepositoryOwner = "watabee"
gitHubRepositoryName = "DevAndroid"
}