Closed
Issue #48 · created by Guntram Blohm · ·

LiteLoader compile fails under Linux

Building under Linux fails with an error message:

FAILURE: Build failed with an exception.

  • Where: Build file '/server/home/gbl/SoftwareProjects/MyProjects/MinecraftMods/LiteLoader/build.gradle' line: 271

  • What went wrong: A problem occurred evaluating root project 'LiteLoader'.

    Ambiguous method overloading for method java.io.File#. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

This is in the definition of the deploy task, which says

def libraryDir = new File(new File(System.env.APPDATA), ".minecraft/libraries")

Under Linux, there is no APPDATA environment variable, which results in the null argument to new File, which results in this error.

Since, in Linux, the .minecraft directory gets created in the user's home directory, this should fix it (it definitely works for me):

def libraryDir = new File(new File(System.env.APPDATA == null ? System.env.HOME : System.env.APPDATA), ".minecraft/libraries")

2 participants
liteloader/LiteLoader#48