-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathbuild.gradle.kts
72 lines (56 loc) · 1.58 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
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")
// Our beloved one-nio
compile("ru.odnoklassniki:one-nio:1.2.0")
// 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")
// https://mvnrepository.com/artifact/org.rocksdb/rocksdbjni
compile("org.rocksdb:rocksdbjni:6.2.2")
// 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 = "256m"
useJUnitPlatform()
}
}
application {
// Define the main class for the application
mainClassName = "ru.mail.polis.Cluster"
// And limit Xmx
applicationDefaultJvmArgs = listOf("-Xmx256m")
}
// 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)
}