-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
81 lines (70 loc) · 2.19 KB
/
build.gradle
File metadata and controls
81 lines (70 loc) · 2.19 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
import groovy.json.JsonOutput
plugins {
id 'java'
}
repositories {
mavenCentral()
maven { url "https://repo.spongepowered.org/maven/" }
maven { url "https://maven.fabricmc.net/" }
exclusiveContent {
forRepository { maven { url "https://cursemaven.com" } }
filter { includeGroup "curse.maven" }
}
}
ext {
hytaleHome = "${System.getProperty("user.home")}/AppData/Roaming/Hytale"
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(java_version)
}
configurations {
hytaleServer
compileOnly.extendsFrom(hytaleServer)
hyxin
}
dependencies {
hytaleServer(files("$hytaleHome/install/$patchline/package/game/latest/Server/HytaleServer.jar"))
compileOnly("net.fabricmc:sponge-mixin:0.15.4+mixin.0.8.7")
hyxin("curse.maven:hyxin-1405491:7399430")
}
tasks.register('mixinJar', Jar) {
dependsOn tasks.named('compileJava'), tasks.named('processResources')
archiveBaseName.set('RegisterPack-Fix-20260217')
archiveVersion.set(version)
from(tasks.named('compileJava').get().destinationDirectory) {
include 'registerpackfix/**'
}
from("$buildDir/resources/main") {
include 'registerpackfix.mixins.json'
}
doFirst {
def manifest = [
Group : 'Community',
Name : 'RegisterPack-Fix-20260217',
Version: version,
Description: 'Re-adds the 3-arg AssetModule.registerPack overload removed in the 2026.02.17 server update.',
ServerVersion: '*',
DisabledByDefault: false,
Hyxin: [ Configs: ['registerpackfix.mixins.json'] ]
]
def manifestFile = file("$buildDir/tmp/mixinJar/manifest.json")
manifestFile.parentFile.mkdirs()
manifestFile.text = JsonOutput.prettyPrint(JsonOutput.toJson(manifest))
}
from("$buildDir/tmp/mixinJar") {
include 'manifest.json'
}
}
tasks.register('copyEarlyPlugins') {
dependsOn tasks.named('mixinJar')
doLast {
copy {
from configurations.hyxin
from tasks.named('mixinJar').get().archiveFile
into "$projectDir/run/earlyplugins"
}
}
}
tasks.named('build') {
dependsOn tasks.named('mixinJar')
}