forked from GrimAnticheat/Grim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
151 lines (127 loc) · 5.06 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.Permission
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("io.freefair.lombok") version "6.6"
//id("net.minecrell.plugin-yml.bukkit") version "0.5.2"
}
group = "ac.grim.grimac"
version = "2.3.40"
description = "Libre simulation anticheat designed for 1.19 with 1.8-1.19 support, powered by PacketEvents 2.0."
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") // Spigot
maven("https://jitpack.io/") // Grim API
maven("https://repo.viaversion.com") // ViaVersion
maven("https://repo.aikar.co/content/groups/aikar/") // ACF
maven("https://nexus.scarsz.me/content/repositories/releases") // Configuralize
maven("https://clojars.org/repo") // MultiPaper MultiLib
maven("https://repo.opencollab.dev/maven-snapshots/") // Floodgate
maven("https://repo.codemc.io/repository/maven-snapshots/") // PacketEvents
mavenCentral()
maven {
url = uri("https://repo.clojars.org")
name = "Clojars"
}
// FastUtil, Discord-Webhooks
}
dependencies {
implementation("com.github.retrooper.packetevents:spigot:2.0-SNAPSHOT")
implementation("co.aikar:acf-paper:0.5.1-20230402.114301-23")
implementation("club.minnced:discord-webhooks:0.8.0")
implementation("it.unimi.dsi:fastutil:8.5.9")
implementation("org.jetbrains:annotations:23.1.0") // Why is this needed to compile?
implementation("github.scarsz:configuralize:1.4.0")
implementation("com.github.puregero:multilib:1.1.8")
implementation("com.github.grimanticheat:grimapi:add576ba8b")
// Used for local testing: implementation("ac.grim.grimac:grimapi:1.0")
compileOnly("org.geysermc.floodgate:api:2.0-SNAPSHOT")
compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("com.viaversion:viaversion-api:4.1.1")
compileOnly("io.netty:netty-all:4.1.85.Final")
}
/*bukkit {
name = "GrimAC"
author = "GrimAC"
main = "ac.grim.grimac.GrimAC"
apiVersion = "1.13"
softDepend = listOf(
"ProtocolLib",
"ProtocolSupport",
"ViaVersion",
"Essentials",
"ViaBackwards",
"ViaRewind",
"Geyser-Spigot"
)
permissions {
register("grim.alerts") {
description = "Receive alerts for violations"
default = Permission.Default.OP
}
register("grim.alerts.enable-on-join") {
description = "Enable alerts on join"
default = Permission.Default.OP
}
register("grim.performance") {
description = "Check performance metrics"
default = Permission.Default.OP
}
register("grim.profile") {
description = "Check user profile"
default = Permission.Default.OP
}
register("grim.brand") {
description = "Show client brands on join"
default = Permission.Default.OP
}
register("grim.sendalert") {
description = "Send cheater alert"
default = Permission.Default.OP
}
register("grim.nosetback") {
description = "Disable setback"
default = Permission.Default.FALSE
}
register("grim.nomodifypacket") {
description = "Disable modifying packets"
default = Permission.Default.FALSE
}
register("grim.exempt") {
description = "Exempt from all checks"
default = Permission.Default.FALSE
}
}
}*/
tasks.build {
dependsOn(tasks.shadowJar)
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
publishing.publications.create<MavenPublication>("maven") {
artifact(tasks["shadowJar"])
}
tasks.shadowJar {
minimize()
archiveFileName.set("${project.name}-${project.version}.jar")
relocate("io.github.retrooper.packetevents", "ac.grim.grimac.shaded.io.github.retrooper.packetevents")
relocate("com.github.retrooper.packetevents", "ac.grim.grimac.shaded.com.github.retrooper.packetevents")
relocate("co.aikar.acf", "ac.grim.grimac.shaded.acf")
relocate("club.minnced", "ac.grim.grimac.shaded.discord-webhooks")
relocate("github.scarsz.configuralize", "ac.grim.grimac.shaded.configuralize")
relocate("com.github.puregero", "ac.grim.grimac.shaded.com.github.puregero")
relocate("com.google.gson", "ac.grim.grimac.shaded.gson")
relocate("alexh", "ac.grim.grimac.shaded.maps")
relocate("it.unimi.dsi.fastutil", "ac.grim.grimac.shaded.fastutil")
relocate("net.kyori", "ac.grim.grimac.shaded.kyori")
relocate("okhttp3", "ac.grim.grimac.shaded.okhttp3")
relocate("okio", "ac.grim.grimac.shaded.okio")
relocate("org.yaml.snakeyaml", "ac.grim.grimac.shaded.snakeyaml")
relocate("org.json", "ac.grim.grimac.shaded.json")
relocate("org.intellij", "ac.grim.grimac.shaded.intellij")
relocate("org.jetbrains", "ac.grim.grimac.shaded.jetbrains")
}