-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
134 lines (113 loc) · 3.69 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
plugins {
id 'jacoco'
id 'idea'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'org.jetbrains.kotlin.kapt' version '1.3.61'
id 'org.jetbrains.kotlin.plugin.spring' version '1.3.61'
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.zensoft.versioning' version '1.1.0' // This plugin made by me and my previous team :)
}
apply plugin: 'io.spring.dependency-management'
group = 'me.ruslanys'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
jcenter()
}
ext {
jsoupVersion = '1.12.1'
awsSdkVersion = '2.10.47'
}
dependencies {
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation('com.fasterxml.jackson.module:jackson-module-kotlin')
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8")
// Spring
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation('org.springframework.boot:spring-boot-starter-freemarker')
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-redis-reactive")
// Tools
implementation("org.jsoup:jsoup:$jsoupVersion")
implementation('io.micrometer:micrometer-registry-prometheus')
implementation("software.amazon.awssdk:s3:$awsSdkVersion")
implementation("software.amazon.awssdk:netty-nio-client:$awsSdkVersion")
implementation('org.apache.tika:tika-core:1.23')
implementation('com.github.kilianB:JImageHash:3.0.0')
// DevTools
runtimeOnly('org.springframework.boot:spring-boot-devtools')
kapt('org.springframework.boot:spring-boot-configuration-processor')
// Tests
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation("io.projectreactor:reactor-test")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
test.kotlin.srcDirs += 'src/test/kotlin'
}
// Jar
bootJar {
manifest {
attributes("Implementation-Version": archiveVersion)
}
}
// Kotlin
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
// Tests
test {
useJUnitPlatform()
if (project.hasProperty('maxParallelForks')) {
maxParallelForks = project.maxParallelForks as int
}
if (project.hasProperty('forkEvery')) {
forkEvery = project.forkEvery as int
}
}
jacoco {
toolVersion = "0.8.5"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
afterEvaluate {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'me/ruslanys/ifunny/*Application*',
'me/ruslanys/ifunny/config/**',
'me/ruslanys/ifunny/property/**',
'me/ruslanys/ifunny/domain/**',
'me/ruslanys/ifunny/grab/event/**'
])
})
}
}
check.dependsOn jacocoTestReport
// IDEA
idea {
module {
def kaptMain = file('build/generated/source/kapt/main')
sourceDirs += kaptMain
generatedSourceDirs += kaptMain
}
}