From deaaf3042b0fd93c52c0d149056e5b9d6ba76a32 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 24 Apr 2012 20:58:09 +0400 Subject: [PATCH] Fixed compilation in build-tools --- build-tools/build-tools.iml | 1 + .../org/jetbrains/jet/buildtools/core/BytecodeCompiler.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build-tools/build-tools.iml b/build-tools/build-tools.iml index d184270053f..d0304c4b431 100644 --- a/build-tools/build-tools.iml +++ b/build-tools/build-tools.iml @@ -10,6 +10,7 @@ + diff --git a/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java b/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java index 0f35310a117..6e886343e5f 100644 --- a/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java +++ b/build-tools/core/src/org/jetbrains/jet/buildtools/core/BytecodeCompiler.java @@ -16,6 +16,7 @@ package org.jetbrains.jet.buildtools.core; +import jet.modules.Module; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.compiler.*; @@ -139,7 +140,9 @@ public class BytecodeCompiler { public void moduleToJar ( @NotNull String module, @NotNull String jar, boolean includeRuntime, @Nullable String stdlib, @Nullable String[] classpath ) { try { CompileEnvironmentConfiguration env = env(stdlib, classpath); - boolean success = KotlinToJVMBytecodeCompiler.compileModules(env, module, jar, null, includeRuntime); + List modules = CompileEnvironmentUtil.loadModuleScript(module, env.getMessageCollector()); + File directory = new File(module).getParentFile(); + boolean success = KotlinToJVMBytecodeCompiler.compileModules(env, modules, directory, jar, null, includeRuntime); if ( ! success ) { throw new CompileEnvironmentException( errorMessage( module, false )); }