MinecraftForge / ForgeGradle

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

Offline Build Issue FG_3.0 #572

Closed ghost closed 5 years ago

ghost commented 5 years ago

ForgeGradle 3.0.1xx can't build offline because it tries to download the minecraft versión manifest from mojang repo and fails because it doesn't catch the UnkownHostException resulting in an error.

Edit: I live in Cuba... in case nobody reads the latest comments..

I'm closing this, I hope someone in the forums know what should I do...

ghost commented 5 years ago

More detailed, it's caused by DownloadMCMeta class at method downloadMCMeta, when it's building the inputstream it gets an exception if it's offline... That exception is not caught and execution can't continue further.

DaemonUmbra commented 5 years ago

The point of this task is to download a file, how should that file be replaced if it cannot be downloaded?

Pokechu22 commented 5 years ago

If the file is already downloaded, it shouldn't try to download again if the build is offline. If the file hasn't yet been downloaded, the build should fail. IIRC that's the same behavior gradle uses for regular dependencies.

LexManos commented 5 years ago

Its a standard task, with standard task caching. So yes thats the behavior it does. Offline builds are dubious at best tho. You need the metadata to know what libraries to include. If you want to submit a PR to 'fix' this go for it, but I dont think it needs fixing.

ghost commented 5 years ago

i live in cuba, i can only use my cellphone to download the file...

ghost commented 5 years ago

I used to trick ForgeGradle 2.3 with maven local and a manually settled up cradle cache so it doesn't complain...but I can't pull that of again...seems that now it's different... and, yes, I had to download every .pom and .jar and every asset of Minecraft manually... 1000+ download by cellphone...yeah...pain...

ghost commented 5 years ago

So by caching...so you mean something human tweakable or a lot of files marked by horrible binary metadata?

ghost commented 5 years ago

Yeah...why do I ask, of course it's metadata...

ghost commented 5 years ago

I shouldn't submit a PR... It seems unnecessary... after all... it's only me the one with the issue... I'm probably the only Minecraft 1.13.2 + Forge user in my town...for not saying in my country... most people don't even know what is java...