-
Notifications
You must be signed in to change notification settings - Fork 59
/
build.gradle.kts
108 lines (94 loc) · 2.75 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
import com.diffplug.gradle.spotless.SpotlessExtension
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
classpath(libs.kotlin.gradle.plugin)
classpath(libs.coveralls.gradle.plugin)
classpath(libs.gradle)
classpath(libs.dokka.base)
}
}
plugins {
alias(libs.plugins.org.jetbrains.kotlin.jvm)
alias(libs.plugins.kt3k.coveralls)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.dagger.hilt.android) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.org.jetbrains.dokka)
alias(libs.plugins.org.owasp.dependencycheck)
alias(libs.plugins.com.diffplug.spotless) apply false
alias(libs.plugins.android.junit5) apply false
}
tasks.dokkaHtmlMultiModule {
moduleName.set("OpenSRP")
moduleVersion.set(project.version.toString())
outputDirectory.set(file(buildDir.resolve("dokka")))
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
footerMessage = "(c) Ona Systems Inc"
}
}
apply(from = "mapbox.gradle.kts")
allprojects {
repositories {
gradlePluginPortal()
mavenLocal()
google()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://repo.spring.io/plugins-release")
maven(url = "https://repository.liferay.com/nexus/content/repositories/public")
apply(plugin = "org.owasp.dependencycheck")
tasks.dependencyCheckAggregate{
dependencyCheck.formats.add("XML")
}
}
}
subprojects {
apply {
plugin("com.diffplug.spotless")
plugin("org.jetbrains.dokka")
plugin( "jacoco")
}
configure<SpotlessExtension> {
kotlin {
target("**/*.kt")
ktlint(BuildConfigs.ktLintVersion)
ktfmt().googleStyle()
licenseHeaderFile("${project.rootProject.projectDir}/license-header.txt")
}
kotlinGradle {
target("*.gradle.kts")
ktlint(BuildConfigs.ktLintVersion)
ktfmt().googleStyle()
}
format("xml") {
target("**/*.xml")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format("json") {
target("**/*.json")
indentWithSpaces(2)
trimTrailingWhitespace()
}
}
configurations.all {
resolutionStrategy {
eachDependency {
when (requested.group) {
"org.jacoco" -> useVersion(BuildConfigs.jacocoVersion)
}
}
}
}
tasks.withType<Test> {
configure<JacocoTaskExtension> {
isIncludeNoLocationClasses = true
excludes = listOf("jdk.internal.*", "**org.hl7*")
}
}
}