-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
44 lines (36 loc) · 1.15 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.springframework.boot.gradle.tasks.bundling.BootJar
import org.springframework.boot.gradle.tasks.run.BootRun
plugins {
java
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependencyManagement)
alias(libs.plugins.lombok)
alias(libs.plugins.shadow)
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-jdbc")
compileOnly("com.opencsv:opencsv:5.8")
// You may add any utility library you want to use, such as guava.
// ORM libraries are prohibited in this project.
}
tasks.withType<BootRun> {
enabled = false
}
tasks.withType<BootJar> {
enabled = false
}
tasks.register("submitJar") {
group = "application"
description = "Prepare an uber-JAR for submission"
tasks.getByName<ShadowJar>("shadowJar") {
archiveFileName = "sustc-api.jar"
destinationDirectory = File("$rootDir/submit")
dependencies {
exclude(dependency("ch.qos.logback:logback-.*"))
}
}.let { dependsOn(it) }
}
tasks.clean {
delete(fileTree("$rootDir/submit").matching { include("*.jar") })
}