Module file is not needed when compiling modules

This commit is contained in:
Andrey Breslav
2012-04-24 20:52:48 +04:00
parent 8a40f943de
commit 0ab212b240
2 changed files with 4 additions and 4 deletions
@@ -154,8 +154,9 @@ public class KotlinCompiler {
boolean noErrors;
if (arguments.module != null) {
List<Module> modules = CompileEnvironmentUtil.loadModuleScript(arguments.module, configuration.getMessageCollector());
File directory = new File(arguments.module).getParentFile();
noErrors = KotlinToJVMBytecodeCompiler.compileModules(configuration, modules,
arguments.module, arguments.jar, arguments.outputDir,
directory, arguments.jar, arguments.outputDir,
arguments.includeRuntime);
}
else {
@@ -67,7 +67,7 @@ public class KotlinToJVMBytecodeCompiler {
public static ClassFileFactory compileModule(
CompileEnvironmentConfiguration configuration,
Module moduleBuilder,
String directory
File directory
) {
if (moduleBuilder.getSourceFiles().isEmpty()) {
throw new CompileEnvironmentException("No source files where defined");
@@ -103,12 +103,11 @@ public class KotlinToJVMBytecodeCompiler {
@NotNull List<Module> modules,
@NotNull String moduleScriptFile,
@NotNull File directory,
@Nullable String jarPath,
@Nullable String outputDir,
boolean jarRuntime) {
final String directory = new File(moduleScriptFile).getParent();
for (Module moduleBuilder : modules) {
// TODO: this should be done only once for the environment
if (configuration.getCompilerDependencies().getRuntimeJar() != null) {