forked from PaperMC/bibliothek
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
67 lines (58 loc) · 1.69 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
plugins {
id("java")
alias(libs.plugins.indra)
alias(libs.plugins.indra.checkstyle)
alias(libs.plugins.spotless)
alias(libs.plugins.spring.dependency.management)
alias(libs.plugins.spring.boot)
}
group = "io.papermc"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
}
indra {
javaVersions {
target(17)
}
github("PaperMC", "bibliothek")
mitLicense()
}
spotless {
java {
endWithNewline()
importOrderFile(rootProject.file(".spotless/bibliothek.importorder"))
indentWithSpaces(2)
licenseHeaderFile(rootProject.file("license_header.txt"))
trimTrailingWhitespace()
}
}
dependencies {
annotationProcessor("org.springframework.boot", "spring-boot-configuration-processor")
checkstyle(libs.stylecheck)
implementation(libs.jetbrains.annotations)
implementation(libs.springdoc.openapi.starter.webmvc.ui)
implementation("org.springframework.boot", "spring-boot-starter-data-mongodb")
implementation("org.springframework.boot", "spring-boot-starter-validation")
implementation("org.springframework.boot", "spring-boot-starter-web")
testImplementation("org.springframework.boot", "spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
}
tasks {
bootJar {
launchScript()
}
// From StackOverflow: https://stackoverflow.com/a/53087407
// Licensed under: CC BY-SA 4.0
// Adapted to Kotlin
register<Copy>("buildForDocker") {
from(bootJar)
into("build/libs/docker")
rename { fileName ->
// a simple way is to remove the "-$version" from the jar filename
// but you can customize the filename replacement rule as you wish.
fileName.replace("-$version", "")
}
}
}