-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
69 lines (60 loc) · 1.64 KB
/
Copy pathbuild.gradle
File metadata and controls
69 lines (60 loc) · 1.64 KB
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 {
id 'java'
id 'com.gradleup.shadow' version '8.3.0'
}
group = 'net.wolvesfortress.heightmap'
version = '1.0.0'
repositories {
mavenCentral()
// Official Hytale Maven repository
maven {
name = 'hytale-release'
url = 'https://maven.hytale.com/release'
}
maven {
name = 'hytale-pre-release'
url = 'https://maven.hytale.com/pre-release'
}
}
dependencies {
// Hytale Server API from official Maven repository
compileOnly 'com.hypixel.hytale:Server:2026.02.19-1a311a592'
// JSR305 annotations (@Nonnull, @Nullable)
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.google.code.gson:gson:2.10.1'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
shadowJar {
archiveClassifier.set('')
// Exclude server classes from the final JAR
dependencies {
exclude(dependency { it.moduleGroup == 'com.hypixel' })
}
}
// Disable the default jar task to avoid conflicts with shadowJar
tasks.named('jar') {
enabled = false
}
tasks.named('build') {
dependsOn shadowJar
}
// Deploy plugin JAR to server mods folder
tasks.register('deployToServer', Copy) {
// Using 'from shadowJar' automatically adds task dependency and proper input tracking
from shadowJar
into 'server/mods'
doLast {
println "Deployed to server/mods/"
}
}
// Watch for changes and auto-rebuild (useful during development)
tasks.register('watch') {
doLast {
println "Watching for changes... Press Ctrl+C to stop."
println "Run 'gradle build --continuous' for auto-rebuild on file changes."
}
}