-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
65 lines (53 loc) · 1.8 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.10"
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.4")
implementation("io.javalin:javalin:4.3.0")
implementation("com.unboundid:unboundid-ldapsdk:3.1.1")
implementation("org.javassist:javassist:3.28.0-GA")
implementation("org.apache.tomcat:tomcat-catalina:8.5.38")
// suppress warning about SLF4J
implementation("org.slf4j:slf4j-nop:1.7.35")
compileOnly("org.springframework:spring-web:5.2.9.RELEASE")
compileOnly("org.springframework.webflow:spring-webflow:2.5.1.RELEASE")
compileOnly("org.eclipse.jetty:jetty-server:9.4.43.v20210629")
testImplementation("org.apache.logging.log4j:log4j-core:2.14.1")
testImplementation("org.codehaus.groovy:groovy:3.0.1")
testImplementation("org.jetbrains.kotlin:kotlin-reflect:1.1.51")
testImplementation("org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE") {
exclude(module = "spring-boot-starter-logging")
exclude(module = "spring-boot-starter-jetty")
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<JavaCompile> {
options.run {
isFork = true
isWarnings = false
forkOptions.executable = "javac"
compilerArgs.plusAssign("-XDignore.symbol.file")
}
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "MainKt"
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
dependsOn(configurations.runtimeClasspath)
from(
configurations.runtimeClasspath.get()
.filter { it.name.endsWith("jar") }
.map { zipTree(it) }
)
}
// for mixing java and kotlin files
sourceSets.main {
java.srcDir("src/main/kotlin")
}