forked from suhova/2020-db-lsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
66 lines (52 loc) · 1.4 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
import net.ltgt.gradle.errorprone.errorprone
plugins {
java
application
id("net.ltgt.errorprone") version "0.8.1"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
jcenter()
}
dependencies {
// Checks
errorprone("com.google.errorprone:error_prone_core:2.3.3")
// Logging
compile("org.slf4j:slf4j-api:1.7.26")
compile("ch.qos.logback:logback-classic:1.2.3")
// Annotations for better code documentation
compile("com.intellij:annotations:12.0")
// Guava primitives
compile("com.google.guava:guava:27.0.1-jre")
// JUnit Jupiter test framework
testCompile("org.junit.jupiter:junit-jupiter-api:5.4.0")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.4.0")
}
val run by tasks.getting(JavaExec::class) {
standardInput = System.`in`
}
tasks {
test {
maxHeapSize = "128m"
useJUnitPlatform()
}
}
application {
// Define the main class for the application
mainClassName = "ru.mail.polis.Client"
// And limit Xmx
applicationDefaultJvmArgs = listOf("-Xmx128m")
}
// Fail on warnings
tasks.withType<JavaCompile> {
val compilerArgs = options.compilerArgs
compilerArgs.add("-Werror")
compilerArgs.add("-Xlint:all")
}
// Error prone options
tasks.named<JavaCompile>("compileTestJava") {
options.errorprone.isEnabled.set(false)
}