Passing sources via compiler configuration in K2JSCompiler.

This commit is contained in:
Evgeny Gerashchenko
2012-07-11 18:43:11 +04:00
parent ea6c4116df
commit f45494548f
@@ -74,11 +74,9 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments, K2JSCompile
return ExitCode.INTERNAL_ERROR; return ExitCode.INTERNAL_ERROR;
} }
JetCoreEnvironment environmentForJS = JetCoreEnvironment.createCoreEnvironmentForJS(rootDisposable, new CompilerConfiguration()); CompilerConfiguration configuration = new CompilerConfiguration();
configuration.addAll(CommonConfigurationKeys.SOURCE_ROOTS_KEY, Arrays.asList(arguments.sourceFiles));
for (String sourceFile : arguments.sourceFiles) { JetCoreEnvironment environmentForJS = JetCoreEnvironment.createCoreEnvironmentForJS(rootDisposable, configuration);
environmentForJS.addSources(sourceFile);
}
Project project = environmentForJS.getProject(); Project project = environmentForJS.getProject();