-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (60 loc) · 2.88 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.3.11"
kotlin("jvm") version kotlinVersion
kotlin("plugin.allopen") version kotlinVersion // Open classes for custom annotations
kotlin("plugin.spring") version kotlinVersion // Open classes for Spring annotations
kotlin("plugin.jpa") version kotlinVersion // No-args constructor for JPA classes
id("org.springframework.boot") version "2.1.1.RELEASE" //Spring Boot support
// Control the project's dependencies versions like Maven's BOM
id("io.spring.dependency-management") version "1.0.6.RELEASE"
}
group = "com.davfer.organizer"
version = "1.0-SNAPSHOT"
description = """ Organizer - Spring project with Kotlin """
repositories {
mavenCentral()
maven("https://repo.spring.io/milestone") //for spring cloud dependencies
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect")) // Kotlin reflection library (mandatory as of Spring Framework 5)
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.session:spring-session-data-redis")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-mail")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(module = "junit") //Exclude JUnit 4
}
implementation(platform("org.springframework.cloud:spring-cloud-dependencies:Greenwich.RC2")) //BOM
implementation("org.springframework.cloud:spring-cloud-starter-config")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
// Support for serialization/deserialization of Kotlin classes and data classes
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.mockito:mockito-junit-jupiter")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
runtimeOnly("mysql:mysql-connector-java:8.0.13")
implementation("io.projectreactor:reactor-bus:2.0.8.RELEASE")
implementation("io.projectreactor:reactor-core:2.0.8.RELEASE")
}
allOpen {
annotation("javax.persistence.Entity")
annotation("javax.persistence.MappedSuperclass")
annotation("javax.persistence.Embeddable")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")//Allow Kotlin null-safety with Spring
}
}
tasks.withType<Wrapper> {
gradleVersion = "5.0"
}
tasks.withType<Test> {
useJUnitPlatform() //Enable JUnit 5 support
}