RubixDev / Inventorio

Inventorio - an inventory enhancement mod for Minecraft (Fabric / (Neo)Forge)
https://modrinth.com/mod/inventorio
57 stars 19 forks source link

[1.20] Hang when building on remapJar step #357

Open randomcoder67 opened 1 month ago

randomcoder67 commented 1 month ago

Running: ./gradlew build

This will be the eventual output:

<===========--> 88% EXECUTING [1m 10s]
> :forge:remapJar
> :common:remapJar
> :fabric:remapJar

And it will seemingly hang like this forever. Pressing Ctrl-C to kill the process will leave a java process running in the background, taking up a lot of CPU but seemingly doing nothing.

There are some errors/warnings about the remapJar tasks:

> Task :common:remapJar
Could not find fabric.mod.json file in: inventorio-1.9.2-dev.jar

Also for some reason running exactly the same command again (after force killing the background java task), it seems to build fine.

Building on Arch Linux with openJDK 17

RubixDev commented 1 month ago

I'm not sure exactly why it behaves that way, but because this project is for multiple Minecraft versions and multiple mod loaders at the same time, the gradle structure is a bit different from normal. If you want to build all subprojects and collect the jars into the main build/libs folder, run ./gradlew buildAndGather instead. Otherwise there are version-specific tasks like ./gradlew :1.20.4-fabric:build. That's also why there's no fabric.mod.json in the main source directory, because that code is common for both Fabric and Forge. It's located in versions/1.20.4-fabric/src/main/resources/fabric.mod.json instead and will be shared for all -fabric projects.