Passing sources via compiler configuration in K2JSCompiler.
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user