js compiler: module dependency
This commit is contained in:
@@ -151,10 +151,10 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments, K2JSCompile
|
||||
@NotNull
|
||||
private static Config getConfig(@NotNull K2JSCompilerArguments arguments, @NotNull Project project) {
|
||||
EcmaVersion ecmaVersion = EcmaVersion.fromString(arguments.target);
|
||||
if (arguments.libzip == null) {
|
||||
if (arguments.libraryFiles == null) {
|
||||
// lets discover the JS library definitions on the classpath
|
||||
return new ClassPathLibraryDefintionsConfig(project, ecmaVersion);
|
||||
}
|
||||
return new ZippedLibrarySourcesConfig(project, arguments.libzip, ecmaVersion);
|
||||
return new LibrarySourcesConfig(project, arguments.libraryFiles, ecmaVersion);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ public class K2JSCompilerArguments extends CompilerArguments {
|
||||
public String outputFile;
|
||||
|
||||
//NOTE: may well be a subject to change soon
|
||||
@Argument(value = "libzip", description = "Path to zipped lib sources")
|
||||
public String libzip;
|
||||
@Argument(value = "libraryFiles", description = "Path to zipped lib sources or kotlin files")
|
||||
public String[] libraryFiles;
|
||||
|
||||
@Argument(value = "srcdir", description = "Sources directory")
|
||||
public String srcdir;
|
||||
|
||||
Reference in New Issue
Block a user