-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
91 lines (78 loc) · 2.51 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.4.7"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("org.asciidoctor.convert") version "1.5.9.2"
id("maven-publish")
id("io.gitlab.arturbosch.detekt").version("1.9.1")
kotlin("jvm") version "1.5.10"
kotlin("plugin.spring") version "1.5.10"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.apache.commons:commons-lang3:3.4")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
runtimeOnly("org.springframework.boot:spring-boot-devtools")
asciidoctor("org.springframework.restdocs:spring-restdocs-asciidoctor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("com.natpryce:hamkrest:1.7.0.0")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
testImplementation("org.springframework.restdocs:spring-restdocs-webtestclient")
}
val snippetsDir by extra { file("build/generated-snippets") }
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
tasks {
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
outputs.dir(snippetsDir)
}
asciidoctor {
inputs.dir(snippetsDir)
dependsOn(test)
}
bootJar {
dependsOn(asciidoctor)
into("static/docs") {
from("build/asciidoc/html5")
}
}
}
publishing {
publications {
create<MavenPublication>("bootJava") {
artifact(tasks.getByName("bootJar"))
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/autotraderuk/chaos-kraken")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
detekt {
config = files("detekt-config.yml")
buildUponDefaultConfig = true
}