Fixed compilation in build-tools
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
<orderEntry type="module" module-name="cli" />
|
<orderEntry type="module" module-name="cli" />
|
||||||
<orderEntry type="library" name="intellij-core" level="project" />
|
<orderEntry type="library" name="intellij-core" level="project" />
|
||||||
<orderEntry type="module" module-name="frontend.java" />
|
<orderEntry type="module" module-name="frontend.java" />
|
||||||
|
<orderEntry type="module" module-name="runtime" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.buildtools.core;
|
package org.jetbrains.jet.buildtools.core;
|
||||||
|
|
||||||
|
import jet.modules.Module;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.compiler.*;
|
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 ) {
|
public void moduleToJar ( @NotNull String module, @NotNull String jar, boolean includeRuntime, @Nullable String stdlib, @Nullable String[] classpath ) {
|
||||||
try {
|
try {
|
||||||
CompileEnvironmentConfiguration env = env(stdlib, classpath);
|
CompileEnvironmentConfiguration env = env(stdlib, classpath);
|
||||||
boolean success = KotlinToJVMBytecodeCompiler.compileModules(env, module, jar, null, includeRuntime);
|
List<Module> modules = CompileEnvironmentUtil.loadModuleScript(module, env.getMessageCollector());
|
||||||
|
File directory = new File(module).getParentFile();
|
||||||
|
boolean success = KotlinToJVMBytecodeCompiler.compileModules(env, modules, directory, jar, null, includeRuntime);
|
||||||
if ( ! success ) {
|
if ( ! success ) {
|
||||||
throw new CompileEnvironmentException( errorMessage( module, false ));
|
throw new CompileEnvironmentException( errorMessage( module, false ));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user