-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
74 lines (58 loc) · 2.18 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.3.20"
base
kotlin("jvm") version kotlinVersion apply false
id("org.jetbrains.dokka") version "0.9.17"
}
version = "1.0.0-SNAPSHOT"
subprojects {
apply(plugin = "java-library")
apply(plugin = "org.jetbrains.kotlin.jvm")
group = "com.ninja-squad.spring-rest-docs-kotlin"
version = rootProject.version
description = "Kotlin DSL for Spring-REST-Docs ($name)"
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
maven(url = uri("https://repo.spring.io/snapshot"))
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}
withType<Test> {
useJUnitPlatform()
}
}
dependencies {
"implementation"(platform("org.springframework:spring-framework-bom:5.2.0.BUILD-SNAPSHOT"))
"implementation"("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
"testImplementation"("org.junit.jupiter:junit-jupiter:5.4.0")
"testImplementation"("org.assertj:assertj-core:3.11.1")
"testImplementation"("org.jetbrains.kotlin:kotlin-reflect")
}
}
tasks {
dokka {
moduleName = rootProject.name
outputFormat = "html"
jdkVersion = 8
val documentedSubProjects = subprojects.filter { it.name != "examples" }
sourceDirs = files(documentedSubProjects.map { "${it.projectDir}/src/main/kotlin" })
samples = listOf(
"core/src/test/kotlin/com/ninjasquad/springrestdocskotlin/core/examples.kt",
"mockmvc/src/test/kotlin/com/ninjasquad/springrestdocskotlin/mockmvc/examples.kt",
"webtestclient/src/test/kotlin/com/ninjasquad/springrestdocskotlin/webtestclient/examples.kt",
"restassured/src/test/kotlin/com/ninjasquad/springrestdocskotlin/restassured/examples.kt"
)
doFirst {
classpath += files(documentedSubProjects.map { it.the<SourceSetContainer>()["main"].compileClasspath })
}
}
}