forked from CoolLoong/UpdateTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (59 loc) · 1.62 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
plugins {
`java-library`
`maven-publish`
idea
id("com.github.johnrengelman.shadow") version "8.1.1"
}
repositories {
mavenLocal()
maven("https://repo.maven.apache.org/maven2/")
maven("https://jitpack.io")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
group = "cn.powernukkitx"
version = "1.0.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_21
dependencies {
implementation("com.squareup:javapoet:1.13.0")
implementation("com.github.AllayMC:NBT:3.0.8")
implementation("com.google.code.gson:gson:2.10.1")
implementation("it.unimi.dsi:fastutil:8.5.12")
implementation("org.jetbrains:annotations:24.1.0")
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
}
//Automatically download dependencies source code
idea {
module {
isDownloadSources = true
isDownloadJavadoc = false
}
}
java {
withSourcesJar()
}
tasks.build {
dependsOn(tasks.shadowJar)
}
sourceSets {
main {
resources {
srcDirs("src/main/resources")
}
}
}
tasks.compileJava {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xpkginfo:always")
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
}
tasks.test {
useJUnitPlatform()
jvmArgs(listOf("--add-opens", "java.base/java.lang=ALL-UNNAMED"))
jvmArgs(listOf("--add-opens", "java.base/java.io=ALL-UNNAMED"))
}
tasks.withType<AbstractCopyTask>() {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}