-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
94 lines (79 loc) · 2.16 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
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
plugins {
id 'java'
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id 'org.jetbrains.kotlin.kapt' version '1.3.21'
id 'org.jetbrains.kotlin.plugin.spring' version '1.3.21'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.3.21'
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'io.zensoft.versioning' version '1.0.0'
}
apply plugin: 'io.spring.dependency-management'
group = 'me.ruslanys'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
ext {
kotlinVersion = '1.3.21'
springBootVersion = '2.1.3'
}
dependencies {
// Spring
compile('org.springframework.boot:spring-boot-starter')
// Kotlin
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
compile('com.fasterxml.jackson.module:jackson-module-kotlin')
// Jackson
compile("com.fasterxml.jackson.core:jackson-databind")
compile("com.fasterxml.jackson.core:jackson-annotations")
compile("com.fasterxml.jackson.core:jackson-core")
// Utils
compile('org.reflections:reflections:0.9.11')
compile('org.apache.commons:commons-text:1.6')
compile('org.jsoup:jsoup:1.11.3')
compile('com.mpatric:mp3agic:0.9.1')
// DevTools
kapt('org.springframework.boot:spring-boot-configuration-processor')
// Tests
testCompile('org.springframework.boot:spring-boot-starter-test')
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
}
// Jar
jar {
manifest {
attributes("Implementation-Version": version)
}
archiveName = rootProject.name + ".jar"
}
bootJar {
launchScript()
}
// Kotlin
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
noArg {
annotations("javax.persistence.MappedSuperclass", "javax.persistence.Entity")
}
// IDEA
idea {
module {
def kaptMain = file('build/generated/source/kapt/main')
sourceDirs += kaptMain
generatedSourceDirs += kaptMain
}
}