-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
115 lines (97 loc) · 3.8 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
import com.github.benmanes.gradle.versions.updates.DependencyUpdates
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.gradle.api.JavaVersion
import org.gradle.api.artifacts.ResolutionStrategy
import org.gradle.api.plugins.JavaPluginConvention
import org.gradle.kotlin.dsl.closureOf
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.repositories
import org.gradle.kotlin.dsl.withType
import org.springframework.boot.gradle.tasks.run.BootRun
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
version = "1.0.0-SNAPSHOT"
buildscript {
project.apply {
from("$rootDir/gradle/dependencies.gradle.kts")
}
val gradlePlugins = extra["gradlePlugins"] as Map<*, *>
repositories {
maven { setUrl("https://plugins.gradle.org/m2/") }
mavenCentral()
jcenter()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { setUrl("https://jitpack.io") }
}
dependencies {
classpath(gradlePlugins["kotlin-gradle-plugin"] as String)
classpath(gradlePlugins["kotlin-allopen"] as String)
classpath(gradlePlugins["kotlin-noarg"] as String)
classpath(gradlePlugins["spring-boot"] as String)
classpath(gradlePlugins["versions"] as String)
classpath(gradlePlugins["git-properties"] as String)
}
}
apply {
plugin("idea")
plugin("kotlin")
plugin("kotlin-spring")
plugin("org.springframework.boot")
plugin("io.spring.dependency-management")
plugin("com.github.ben-manes.versions")
plugin("com.gorylenko.gradle-git-properties")
}
repositories {
mavenCentral()
jcenter()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { setUrl("https://jitpack.io") }
}
val versions = extra["versions"] as Map<*, *>
val libraries = extra["libraries"] as Map<*, *>
val testLibraries = extra["testLibraries"] as Map<*, *>
ext["groovy.version"] = versions["groovy"]
ext["thymeleaf.version"] = versions["thymeleaf"]
ext["thymeleaf-layout-dialect.version"] = versions["thymeleaf-layout-dialect"]
val compile by configurations
val compileOnly by configurations
val testCompile by configurations
dependencies {
compileOnly(libraries["spring-context-indexer"] as String)
compile(libraries["spring-boot-starter-data-mongodb-reactive"] as String)
compile(libraries["spring-boot-starter-data-rest"] as String)
compile(libraries["spring-boot-starter-webflux"] as String)
compile(libraries["spring-boot-starter-breuninger-core"] as String)
compile(libraries["spring-boot-starter-breuninger-jobs"] as String)
compile(libraries["spring-boot-starter-breuninger-mongo"] as String)
compile(libraries["spring-boot-starter-breuninger-togglz"] as String)
compile(libraries["kotlin-stdlib-jre8"] as String)
compile(libraries["kotlin-reflect"] as String)
compile(libraries["jackson-module-kotlin"] as String)
compile(libraries["spring-boot-devtools"] as String)
testCompile(testLibraries["embed-mongo"] as String)
testCompile(testLibraries["spring-boot-starter-breuninger-testsupport"] as String)
testCompile(testLibraries["spring-boot-starter-test"] as String)
testCompile(testLibraries["reactor-test"] as String)
testCompile(testLibraries["mockito-kotlin"] as String)
testCompile(testLibraries["hamkrest"] as String)
}
apply {
from("$rootDir/gradle/test.gradle.kts")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_10
targetCompatibility = JavaVersion.VERSION_1_10
}
tasks {
withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = org.gradle.api.JavaVersion.VERSION_1_8.toString()
}
}
getByName<BootRun>("bootRun") {
systemProperties = System.getProperties().mapKeys { entry -> entry.key.toString() }.toMap()
}
}