forked from FONE1light/fone-backend-jdsl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
118 lines (97 loc) · 2.94 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
109
110
111
112
113
114
115
116
117
118
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.KtlintExtension
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("org.springframework.boot") version "2.7.5"
id("io.spring.dependency-management") version "1.0.15.RELEASE"
id("org.jlleitschuh.gradle.ktlint") version "11.3.1"
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("org.jetbrains.dokka") version "1.7.20"
id("org.jetbrains.kotlinx.kover") version "0.7.3"
id("com.google.protobuf") version "0.8.15"
kotlin("jvm") version "1.7.0"
kotlin("plugin.spring") version "1.7.0"
kotlin("kapt") version "1.6.21"
kotlin("plugin.jpa") version "1.7.0"
kotlin("plugin.allopen") version "1.7.0"
kotlin("plugin.noarg") version "1.7.0"
}
group = "com.fone.filmone"
version = "0.0.1-SNAPSHOT"
detekt {
toolVersion = "1.20.0"
config = files("config/detekt/detekt.yml")
buildUponDefaultConfig = true
}
allprojects {
repositories { mavenCentral() }
tasks {
withType<Assemble> {
dependsOn("ktlintFormat")
}
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
withType<Test> {
useJUnitPlatform()
systemProperty("file.encoding", "UTF-8")
}
withType<BootJar> {
enabled = false
}
}
}
subprojects {
apply {
plugin("idea")
plugin("kotlin")
plugin("kotlin-kapt")
plugin("kotlin-spring")
plugin("org.jlleitschuh.gradle.ktlint")
plugin("org.springframework.boot")
plugin("io.spring.dependency-management")
plugin("org.jetbrains.dokka")
plugin("io.gitlab.arturbosch.detekt")
plugin("org.jetbrains.kotlinx.kover")
}
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
group = "com.fone.filmone.${path.split(":")[1]}"
version = "0.0.1-SNAPSHOT"
tasks {
withType<Jar> {
archiveFileName.set(
project.path.split(":").drop(1).joinToString(separator = "-", postfix = "-") + project.version + ".jar"
)
}
withType<BootJar> {
enabled = false
}
withType<Test> {
useJUnitPlatform()
systemProperty("file.encoding", "UTF-8")
}
}
dependencies {}
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}
configure<KtlintExtension> {
filter {
exclude { element -> element.file.path.contains("generated/") }
}
}
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(buildDir.resolve("$rootDir/devdocs"))
}
dependencies {
subprojects.forEach {
kover(it)
}
}