Closed TropheusJ closed 5 months ago
I believe you can use shadowJar
to merge the subproject jars or simply embed them in the root project.
You should be able to use : https://github.com/FabricMC/fabric-loom/blob/5d2b75dc1dad606211f0fcfabb4ffbfe6430384b/src/main/java/net/fabricmc/loom/task/RemapJarTask.java#L85
RemapJarTask.getNestedJars() will take any mod jar (it must have a fabric.mod.json file) and JIJ that.
I have reworked my system to no longer need this, but it looks like that would be viable.
I am trying to set up JiJ deduplication for a modular mod. I previously did this with a task that finalized remapJar and directly modified the built jar, but that seems to cause issues with parallel builds. I am redoing this to make it more proper. I am trying to instead have a task that
assemble
depends on, like remapJar. It depends on remapJar and uses it as an input. It almost works, but I can't get the deduplicated subproject jars to be used.duplicated
), and I have no way to change that as far as I can tell.IncludedJarFactory will only look for tasks named remapJar and jar, so I can't use a subproject's
deduplicateInclusions
task.Configuration for this would be useful.
If there's another way to do what I want, that would also be good to know.