forked from SF-Sudio/ServerBackup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
52 lines (47 loc) · 1.35 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
plugins {
`java-library`
}
group = "de.sebli"
version = "2.8"
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") {
name = "spigotmc-repo"
}
maven("https://oss.sonatype.org/content/groups/public/") {
name = "sonatype"
}
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
implementation("commons-io:commons-io:2.11.0")
implementation("commons-net:commons-net:3.8.0")
compileOnly("org.junit.jupiter:junit-jupiter:5.8.2")
}
val targetJavaVersion = 8
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible)
options.release.set(targetJavaVersion)
}
processResources {
filesMatching("plugin.yml") {
expand("version" to project.version)
}
}
test {
useJUnitPlatform()
}
jar {
val dependencies = configurations.runtimeClasspath.get().map(::zipTree)
from(dependencies)
exclude("META-INF/LICENSE.txt", "META-INF/NOTICE.txt", "META-INF/maven/**")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}