use of org.jetbrains.jps.model.java.JpsJavaExtensionService in project intellij-elixir by KronicDeth.
the class ElixirBuilder method getBuildOutputDirectory.
/*** doBuildWithElixirc releated private methods */
@NotNull
private static File getBuildOutputDirectory(@NotNull JpsModule module, boolean forTests, @NotNull CompileContext context) throws ProjectBuildException {
JpsJavaExtensionService instance = JpsJavaExtensionService.getInstance();
File outputDirectory = instance.getOutputDirectory(module, forTests);
if (outputDirectory == null) {
String errorMessage = "No output directory for module " + module.getName();
context.processMessage(new CompilerMessage(ElIXIRC_NAME, BuildMessage.Kind.ERROR, errorMessage));
throw new ProjectBuildException(errorMessage);
}
if (!outputDirectory.exists()) {
FileUtil.createDirectory(outputDirectory);
}
return outputDirectory;
}
Aggregations