cli: store unused arguments

This commit is contained in:
Stepan Koltsov
2012-05-22 00:02:56 +04:00
parent ea4a49764d
commit 8623fba01b
5 changed files with 17 additions and 6 deletions
@@ -27,6 +27,7 @@ import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -96,7 +97,7 @@ public class BytecodeCompiler {
*/
public void sourcesToDir ( @NotNull String src, @NotNull String output, @Nullable String stdlib, @Nullable String[] classpath ) {
try {
boolean success = KotlinToJVMBytecodeCompiler.compileBunchOfSources(env(stdlib, classpath), src, null, output, true
boolean success = KotlinToJVMBytecodeCompiler.compileBunchOfSources(env(stdlib, classpath), Collections.singletonList(src), null, output, true
/* Last arg is ignored anyway */);
if ( ! success ) {
throw new CompileEnvironmentException( errorMessage( src, false ));
@@ -119,7 +120,7 @@ public class BytecodeCompiler {
*/
public void sourcesToJar ( @NotNull String src, @NotNull String jar, boolean includeRuntime, @Nullable String stdlib, @Nullable String[] classpath ) {
try {
boolean success = KotlinToJVMBytecodeCompiler.compileBunchOfSources(env(stdlib, classpath), src, jar, null, includeRuntime);
boolean success = KotlinToJVMBytecodeCompiler.compileBunchOfSources(env(stdlib, classpath), Collections.singletonList(src), jar, null, includeRuntime);
if ( ! success ) {
throw new CompileEnvironmentException( errorMessage( src, false ));
}