-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
65 lines (52 loc) · 1.98 KB
/
build.gradle
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
plugins {
id 'groovy'
id 'java'
id 'org.springframework.boot' version '2.6.7'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
// Kotlin plugins
id 'org.jetbrains.kotlin.plugin.noarg' version '1.6.10'
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'org.jetbrains.kotlin.plugin.spring' version '1.6.10' // Kotlin spring plugin allows spring to extend classes
id "org.jetbrains.kotlin.plugin.jpa" version "1.6.10" // Kotlin JPA plugin creates empty constructor for Hibernate
// Kotlin style/static analysis plugins
id 'io.gitlab.arturbosch.detekt' version '1.18.1'
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: "kotlin-jpa"
apply plugin: 'org.jlleitschuh.gradle.ktlint'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.xerial:sqlite-jdbc:3.16.1'
implementation 'org.codehaus.groovy:groovy'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// Kotlin dependencies
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.6.10'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.12.6'
}
tasks.named('test') {
useJUnitPlatform()
}
detekt {
toolVersion = '1.18.1'
buildUponDefaultConfig = true
config = files("$projectDir/config/detekt.yml")
reports {
html.enabled = true
}
}
// Compile Kotlin first and then groovy. We have to do it this way because our Spring Boot
// application class is written in Groovy. Gradle would figure this out but let's make it explicit.
compileGroovy.dependsOn compileKotlin
// Add compiled Kotlin classes to groovy compile class path
compileGroovy.classpath += files(compileKotlin.destinationDir)