-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (78 loc) · 2.71 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
plugins {
idea
java
`project-report`
kotlin("jvm") version Versions.KOTLIN apply false
kotlin("plugin.spring") version Versions.KOTLIN apply false
id("org.springframework.boot") version Versions.SPRING_BOOT apply false
id("io.spring.dependency-management") version "1.0.10.RELEASE"
id("net.rdrei.android.buildtimetracker") version "0.11.0"
}
allprojects {
group = "example.kt"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
}
// Override spring-boot-dependencies bom properties
// https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-bom-import-override-property
ext["kotlin.version"] = Versions.KOTLIN
ext["kotlin-coroutines.version"] = Versions.COROUTINE
}
subprojects {
apply {
plugin("idea")
plugin("java")
plugin("io.spring.dependency-management")
plugin("org.jetbrains.kotlin.jvm")
plugin("org.gradle.project-report")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
javaParameters = true
allWarningsAsErrors = true
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xopt-in=kotlin.RequiresOptIn")
}
}
tasks.withType<Test> {
systemProperty("spring.profiles.active", "test")
useJUnitPlatform {
includeEngines("junit-jupiter")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
mavenBom("com.linecorp.armeria:armeria-bom:${Versions.ARMERIA}")
mavenBom("com.google.protobuf:protobuf-bom:${Versions.PROTOBUF}")
mavenBom("io.grpc:grpc-bom:${Versions.GRPC}")
}
dependencies {
// https://github.com/MicroUtils/kotlin-logging
dependency("io.github.microutils:kotlin-logging:1.12.0")
dependency("io.grpc:grpc-kotlin-stub:${Versions.GRPC_KT}")
}
}
dependencies {
implementation(kotlin("stdlib"))
implementation("io.github.microutils:kotlin-logging")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.springframework.boot:spring-boot-starter-test")
}
configurations.all {
exclude(module = "junit")
exclude(module = "junit-vintage-engine")
}
}
buildtimetracker {
reporters {
register("summary") {
options["shortenTaskNames"] = "false"
}
}
}