forked from opensrp/fhircore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
108 lines (95 loc) · 2.82 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 {
repositories {
google()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
classpath("org.jetbrains.kotlin:kotlin-serialization:1.8.10")
classpath("com.google.dagger:hilt-android-gradle-plugin:2.45")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3")
classpath("com.diffplug.spotless:spotless-plugin-gradle:6.19.0")
classpath("gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0")
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1")
classpath("com.android.tools.build:gradle:7.1.3")
classpath("org.jetbrains.dokka:dokka-base:1.8.20")
classpath("org.owasp:dependency-check-gradle:8.2.1")
}
}
plugins {
id("org.jetbrains.dokka") version "1.8.20"
id("org.owasp.dependencycheck") version "8.2.1"
}
tasks.dokkaHtmlMultiModule {
moduleName.set("OpenSRP")
moduleVersion.set(project.version.toString())
outputDirectory.set(file(buildDir.resolve("dokka")))
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
footerMessage = "(c) Ona Systems Inc"
}
}
allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://jcenter.bintray.com/")
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> {
val lintVersion = "0.49.0"
kotlin {
target("**/*.kt")
ktlint(lintVersion)
ktfmt().googleStyle()
licenseHeaderFile("${project.rootProject.projectDir}/license-header.txt")
}
kotlinGradle {
target("*.gradle.kts")
ktlint(lintVersion)
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("0.8.7")
}
}
}
}
tasks.withType<Test> {
configure<JacocoTaskExtension> {
isIncludeNoLocationClasses = true
excludes = listOf("jdk.internal.*")
}
}
}