-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
83 lines (73 loc) · 2.32 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("io.github.goooler.shadow") version "8.1.7"
kotlin("jvm") version "1.9.20"
}
group = "cn.xor7"
version = "1.3.2"
val commandAPIVer = "9.5.3"
repositories {
mavenLocal()
maven("https://jitpack.io/")
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://maven.aliyun.com/repository/public")
maven("https://repo.leavesmc.org/releases")
maven("https://repo.leavesmc.org/snapshots")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.org/repository/maven-public/")
flatDir {
dirs("libs")
}
}
dependencies {
//anticheat dependencies
compileOnly(files("libs/ThemisAPI_0.15.3.jar"))
compileOnly(files("libs/Matrix_7.9.6A.jar"))
compileOnly(files("libs/VulcanAPI.jar"))
implementation("com.github.MWHunter:GrimAPI:9f5aaef74b")
compileOnly("com.github.Elikill58:Negativity:2.7.1")
//other dependencies
implementation("com.moandjiezana.toml:toml4j:0.7.2")
compileOnly("org.leavesmc.leaves:leaves-api:1.21-R0.1-SNAPSHOT")
implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:${commandAPIVer}")
implementation("dev.jorel:commandapi-bukkit-kotlin:${commandAPIVer}")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
implementation("net.jodah:expiringmap:0.5.11")
}
val targetJavaVersion = 21
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
tasks.processResources {
filesMatching("paper-plugin.yml") {
expand(
mapOf(
"version" to version,
)
)
}
}
tasks.withType<JavaCompile>().configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion)
}
}
tasks.withType<ShadowJar> {
relocate("dev.jorel.commandapi", "cn.xor7.iseeyou.commandapi")
minimize()
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
mergeServiceFiles()
manifest {
attributes["paperweight-mappings-namespace"] = "mojang"
}
}
kotlin {
jvmToolchain(21)
}