Skip to content

Commit 869af7c

Browse files
Fix build errors.
1 parent 2e0ffd1 commit 869af7c

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed

gradle/build.gradle

+1-56
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,13 @@ plugins {
3333
// Common
3434
//
3535
id 'maven-publish'
36-
37-
// For Gradle 7+
38-
// id 'com.github.johnrengelman.shadow' version '7.1.2'
39-
// For Gradle 8+
40-
// id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
4136
}
4237

4338
// Select the Gradle plugin based on the loader.
4439
switch(System.getProperty('pickhaxe.loader.current')) {
4540
case 'forge':
4641
apply plugin: 'net.minecraftforge.gradle'
4742
apply plugin: 'org.parchmentmc.librarian.forgegradle'
48-
apply plugin: 'com.github.johnrengelman.shadow'
4943
break
5044
case 'fabric':
5145
apply plugin: 'fabric-loom'
@@ -262,23 +256,6 @@ tasks.jar {
262256
}
263257
}
264258

265-
shadowJar {
266-
archiveClassifier = ''
267-
configurations = [project.configurations.shade]
268-
269-
// Shadow the listed packages.
270-
relocate ('net.pickhaxe', "${project.group}.shadow.net.pickhaxe") {
271-
exclude "${project.group}"
272-
}
273-
relocate ('haxe', "${project.group}.shadow.haxe") {
274-
exclude "${project.group}"
275-
}
276-
277-
if (System.getProperty('pickhaxe.loader.current').equals('forge')) {
278-
finalizedBy 'reobfShadowJar'
279-
}
280-
}
281-
282259
if (System.getProperty('pickhaxe.loader.current').equals('fabric') && System.getProperty('pickhaxe.haxe.jvm').equals('true')) {
283260
remapJar {
284261
input = file("../build/fabric/${System.getProperty('pickhaxe.minecraft.version')}/${System.getProperty('pickhaxe.mod.id')}-${System.getProperty('pickhaxe.mod.version')}-dev.jar")
@@ -290,28 +267,10 @@ if (System.getProperty('pickhaxe.loader.current').equals('fabric') && System.get
290267
from zipTree("../build/forge/${System.getProperty('pickhaxe.minecraft.version')}/${System.getProperty('pickhaxe.mod.id')}-${System.getProperty('pickhaxe.mod.version')}-dev.jar")
291268
}
292269

293-
task shadowSourcesJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
294-
dependsOn sourcesJar
295-
296-
archiveClassifier = 'shadow'
297-
configurations = [project.configurations.shade]
298-
299-
// Shadow the listed packages.
300-
relocate ('net.pickhaxe', "${project.group}.shadow.net.pickhaxe") {
301-
exclude "${project.group}"
302-
}
303-
relocate ('haxe', "${project.group}.shadow.haxe") {
304-
exclude "${project.group}"
305-
}
306-
}
307-
308270
reobf {
309271
sourcesJar {
310272
finalizedBy('copyReobfSourcesJar')
311-
}
312-
shadowSourcesJar {
313-
finalizedBy('copyReobfShadowSourcesJar')
314-
}
273+
}
315274
}
316275

317276
task copyReobfSourcesJar(type: Copy) {
@@ -321,14 +280,6 @@ if (System.getProperty('pickhaxe.loader.current').equals('fabric') && System.get
321280
exclude '**/*.txt'
322281
into "../build/forge/${System.getProperty('pickhaxe.minecraft.version')}/"
323282
}
324-
325-
task copyReobfShadowSourcesJar(type: Copy) {
326-
from("$buildDir/reobfShadowSourcesJar") {
327-
rename "output.jar", "${System.getProperty('pickhaxe.mod.id')}-${System.getProperty('pickhaxe.mod.version')}.jar"
328-
}
329-
exclude '**/*.txt'
330-
into "../build/forge/${System.getProperty('pickhaxe.minecraft.version')}/"
331-
}
332283
}
333284

334285
if (System.getProperty('pickhaxe.loader.current').equals('fabric')) {
@@ -339,12 +290,6 @@ if (System.getProperty('pickhaxe.loader.current').equals('fabric')) {
339290

340291

341292
if (System.getProperty('pickhaxe.loader.current').equals('forge')) {
342-
assemble.dependsOn shadowJar
343-
344-
reobf {
345-
shadowJar {}
346-
}
347-
348293
jar.finalizedBy('reobfJar')
349294

350295
// Disable additional resource processing for the runClient task.

haxelib.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"classPath": "src",
77
"description": "A Haxe framework to build Minecraft mods. Fabric, Forge, and more.",
88
"contributors": ["MasterEric"],
9-
"releasenote": "template and runClient commands, working Forge and Fabric, and many bugfixes.",
10-
"version": "0.4.0",
9+
"releasenote": "Remove Shadow gradle plugin to fix build errors.",
10+
"version": "0.4.1",
1111
"dependencies": {
1212
"thx.semver": "",
1313
"json2object": "",

0 commit comments

Comments
 (0)