Skip to content

Commit f6ee1c0

Browse files
Merge Wurst-Imperium#1244 (runClientWithMods task) into v7.51.2
2 parents 4d97685 + a07bb26 commit f6ee1c0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

build.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ loom {
6868
accessWidenerPath = file("src/main/resources/wurst.accesswidener")
6969

7070
runs {
71+
clientWithMods {
72+
inherit client
73+
}
74+
7175
clientGameTestWithMods {
7276
inherit client
7377
source = sourceSets.gametest
@@ -89,6 +93,20 @@ dependencies {
8993
testMods "maven.modrinth:sodium:${project.sodium_version}"
9094
}
9195

96+
def cleanClientWithMods = tasks.register("cleanClientWithMods", Delete) {
97+
delete "run/mods"
98+
}
99+
100+
def prepareClientWithMods = tasks.register("prepareClientWithMods", Sync) {
101+
from configurations.testMods
102+
into "run/mods"
103+
}
104+
105+
tasks.named("runClientWithMods") {
106+
dependsOn prepareClientWithMods
107+
finalizedBy cleanClientWithMods
108+
}
109+
92110
def cleanClientGameTestWithMods = tasks.register("cleanClientGameTestWithMods", Delete) {
93111
delete layout.buildDirectory.dir("run/clientGameTestWithMods")
94112
}

0 commit comments

Comments
 (0)