Add null check to refmap location

dev/0.11
modmuss50 2016-10-23 18:47:06 +01:00
parent e274d0c8c5
commit ac8087f1c7
No known key found for this signature in database
GPG Key ID: 773D17BE8BF49C82
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ public class AbstractPlugin implements Plugin<Project> {
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfMojang=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfMojang=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
if(extension.refmapName == null || extension.refmapName.isEmpty()){
project.getLogger().error("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
extension.refmapName = project.getName() + "-refmap.json";
}
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.refmapName).getCanonicalPath());
} catch (IOException e) {
e.printStackTrace();