-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
93 lines (79 loc) · 2.26 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
import io.github.andreabrighi.gradle.gitsemver.conventionalcommit.ConventionalCommit
plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.gitSemVer)
alias(libs.plugins.ktlint)
alias(libs.plugins.kover)
alias(libs.plugins.task.tree)
}
buildscript {
dependencies {
classpath("io.github.andreabrighi:conventional-commit-strategy-for-git-sensitive-semantic-versioning-gradle-plugin:1.0.15")
}
}
repositories {
mavenCentral()
}
dependencies {
implementation(rootProject.libs.kotlin.stdlib)
implementation(project(":commons"))
implementation(project(":utils"))
implementation(libs.log4j.api)
implementation(libs.log4j.core)
implementation(libs.vertx.core)
implementation(libs.vertx.web)
implementation(libs.vertx.web.client)
implementation(libs.vertx.kafka.client)
implementation(libs.jackson.core)
implementation(libs.jackson.module.kotlin)
testImplementation(rootProject.libs.bundles.kotlin.testing)
testImplementation(libs.junit)
kover(project(":friendship-service"))
kover(project(":user-service"))
}
kotlin {
// sets tools to build, run and test the software to version 21
jvmToolchain(21)
// sets all warnings as errors
compilerOptions {
allWarningsAsErrors = true
}
}
tasks.test {
useJUnitPlatform()
}
gitSemVer {
versionPrefix.set("v")
commitNameBasedUpdateStrategy(ConventionalCommit::semanticVersionUpdate)
assignGitSemanticVersion()
}
val kotlinProjects = listOf("friendship-service", "user-service")
kover {
merge {
// Include only kotlin projects
kotlinProjects.forEach {
projects(":$it")
}
// Create an aggregated variant for the main services
createVariant("aggregated") {
add("jvm")
}
}
currentProject {
// Copy the aggregated variant for relevant projects
kotlinProjects.forEach {
copyVariant(it, "aggregated")
}
}
reports {
kotlinProjects.forEach {
variant(it) {
filters.includes.projects.add(":$it")
}
}
}
tasks.dokkaHtmlMultiModule {
outputDirectory.set(layout.projectDirectory.dir("resurces/dokka"))
}
}