-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbuild.gradle
More file actions
166 lines (136 loc) · 4.16 KB
/
Copy pathbuild.gradle
File metadata and controls
166 lines (136 loc) · 4.16 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import kotlin.OptIn
plugins {
id 'java'
alias(libs.plugins.shadow)
alias(libs.plugins.idea.ext)
//alias(libs.plugins.hytalegradle)
alias(libs.plugins.dokka)
id 'com.azuredoom.hytale-tools' version '1.0.31'
}
dependencies {
// Html parsing
shadow libs.jsoup
implementation libs.jsoup
// UI parsing
shadow libs.hytaleuiparser
implementation libs.hytaleuiparser
// Unit testing
testImplementation libs.junit
testRuntimeOnly libs.junit.launcher
dokkaPlugin 'org.jetbrains.dokka:gfm-plugin:2.1.0'
}
repositories {
mavenCentral()
maven(m -> {
m.url("https://mvn.ultradev.app/snapshots")
m.name("ultradevSnapshots")
})
}
dependencies {
// + here means the latest version, but you can hard-wire any known version!
implementation("com.hypixel.hytale:Server:0.5.1")
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(java_version)
withSourcesJar()
withJavadocJar()
}
// Quiet warnings about missing Javadocs.
javadoc {
options.addStringOption('Xdoclint:-missing', '-quiet')
}
hytaleTools {
hytaleVersion = '0.+'
// Optional: override the manifest ServerVersion field.
// If unset, dynamic hytaleVersion selectors like '0.+'
// resolve to the concrete server version in manifest.json.
// manifestServerVersion = '>=0.5.0-pre.9 <0.6.0'
manifestGroup = 'Ellie'
modCredits = 'EllieAU'
patchline = 'release'
modId = 'HyUI'
mainClass = 'au.ellie.hyui.HyUIPlugin'
modDescription = 'A library for mods that helps build GUIs faster and better.'
modUrl = 'ellie.au'
website = 'ellie.au'
curseforgeId = '1431415'
//versionString = '0.9.7'
manifestServerVersion = '>=0.5.0-pre.9 <0.6.0'
// Optional: declare sub-plugins bundled with this mod
//subPlugin('MyFeature', 'com.example.mods.feature.MyFeaturePlugin')
// Optional: enabled by default. Injects hosted Hytale API docs into
// generated Vineflower server sources for easier IDE browsing.
injectServerJavadocsIntoSources = true
}
/*hytale {
// Versioning
patchline = "release"
// Manifest auto update
manifest {
version = project.version.toString()
serverVersion = ">0.5.1"
//serverVersion = "2026.03.26-89796e57b"
author(author_name, "ellie@ellie.au", "https://ellie.au")
//optionalDependencies.put("Buuz135:MultipleHUD", "*");
}
// Server run configuration
includeLocalMods = true
disableSentry = true
allowOp = true
}*/
shadowJar {
archiveBaseName = project.name
archiveClassifier = 'debug'
configurations = [project.configurations.shadow]
}
// Task: Hytale server run
tasks.runServer {
jvmArgs += "-XX:+AllowEnhancedClassRedefinition"
environment("HYUI_DEV", "true")
environment("HYUI_LOGGING_LEVEL", "INFO")
//args = args + "--log FINEST"
}
// Task: Generate release jar
tasks.sourcesJar {
//dependsOn tasks.
}
tasks.register('releaseJar', Jar) {
group = 'build'
description = 'Builds the release jar without dev resources'
archiveClassifier = 'all'
dependsOn tasks.shadowJar
dependsOn tasks.test
def shadowJarTask = tasks.shadowJar as Jar
from(zipTree(shadowJarTask.archiveFile)) {
exclude(
'Common/UI/Custom/Pages/*.html',
'Common/UI/Custom/Pages/ComplexTest.ui',
'Common/UI/Custom/Pages/SimpleTest.ui',
'Common/UI/Custom/*.png',
'au/ellie/hyui/commands/**',
)
}
destinationDirectory = layout.buildDirectory.dir('libs')
}
// Task: Test configuration
/*
configurations {
testRuntimeOnly {
extendsFrom configurations.hytaleServer
}
}
*/
tasks.test {
useJUnitPlatform()
maxHeapSize = "1G"
// Run only if releaseJar is being executed
onlyIf {
gradle.startParameter.taskNames.contains(name)
|| gradle.taskGraph.hasTask(tasks.named("releaseJar").get())
}
// Use Hytale's custom log manager during tests
jvmArgs "-Djava.util.logging.manager=com.hypixel.hytale.logger.backend.HytaleLogManager"
testLogging {
events "passed", "failed", "skipped"
}
}