-
Notifications
You must be signed in to change notification settings - Fork 37
/
build.gradle.kts
102 lines (89 loc) · 2.84 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
import com.vanniktech.code.quality.tools.CodeQualityToolsPluginExtension
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath(ProjectDependencies.androidGradlePlugin)
classpath(ProjectDependencies.kotlinGradlePlugin)
classpath(ProjectDependencies.codeQualityToolsPlugin)
classpath(ProjectDependencies.dokkaPlugin)
classpath(ProjectDependencies.dokkaKotlinPlugin)
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
val githubEventLoggerPackageUrl =
project.findProperty("githubEventLoggerPackageUrl") as? String
?: System.getenv("githubEventLoggerPackageUrl")
val githubPackagesUser = project.findProperty("githubPackagesUser") as? String
?: System.getenv("githubPackagesUser")
val githubPackagesToken = project.findProperty("githubPackagesToken") as? String
?: System.getenv("githubPackagesToken")
if (githubEventLoggerPackageUrl != null) {
maven {
name = "GitHubPackages"
url = uri(githubEventLoggerPackageUrl)
credentials {
username = githubPackagesUser
password = githubPackagesToken
}
}
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
/* Code quality tools config */
apply(plugin = ProjectDependencies.codeQualityTools)
configure<CodeQualityToolsPluginExtension> {
failEarly = true
xmlReports = false
htmlReports = true
textReports = false
ignoreProjects = listOf("buildSrc", "app")
checkstyle {
enabled = false
}
pmd {
enabled = false
}
lint {
enabled = true
baselineFileName = "lint-baseline.xml"
}
ktlint {
enabled = true
toolVersion = Versions.ktlint
}
detekt {
enabled = true
toolVersion = Versions.detect
config = "code_quality_tools/detekt.yml"
failFast = true
}
cpd {
enabled = false
}
kotlin {
allWarningsAsErrors = true
}
}
/* Documentation config */
apply(plugin = "org.jetbrains.dokka")
val dokkaHtmlMultiModule by tasks.existing(DokkaMultiModuleTask::class) {
version = FramesConfig.productVersion
outputDirectory.set(file("$rootDir/docs"))
moduleName.set("${FramesConfig.docsDisplayName} - v${FramesConfig.productVersion}")
}
val dokkaGenerateDocumentation by tasks.registering {
group = "documentation"
dependsOn(dokkaHtmlMultiModule)
}