MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
520 stars 444 forks source link

Can't gradle sync when mc version isn't installed locally. #708

Closed canitzp closed 4 years ago

canitzp commented 4 years ago

I ran over this issue today, when "syncing" the gradle project without the minecraft version installed locally (inside the .minecraft folder) an exception is thrown and the sync is killed. This comes from the commit 0514fde0e883a06d2e4478f448c6592603060244 . The problem is here: https://github.com/MinecraftForge/ForgeGradle/commit/0514fde0e883a06d2e4478f448c6592603060244#diff-d945fd726ec97b5ff897937b22623c5dR59-R67 It tries to create the sha1 of the "localPath" Minecraft file, which doesn't exist, except when it is installed locally. For my dev environment this wasn't a problem, because I just installed the minecraft version locally, but the github ci task failed because of this: https://github.com/canitzp/FeederHelmet/runs/983722553

It should be an easy fix however, because you only need to check if the "localPath" exists, before calculating the sha1

LexManos commented 4 years ago

https://github.com/MinecraftForge/ForgeGradle/commit/b17c95c9fe35220ce0c86f6462d4d765e6bd6acb