refactored the maven plugin to use the vanilla K2JSCompiler directly and avoid using the K2JVMCompiler when generating JS code; also included a default LibrarySourceConfig which detects JS library code on the classpath which works nicer in maven/ant style worlds where dependencies tend to be specified rather than file paths to zip files

This commit is contained in:
James Strachan
2012-05-29 17:28:15 +01:00
parent 8daeb735e4
commit 4921aeafc3
13 changed files with 102 additions and 124 deletions
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.maven.doc;
import org.apache.maven.plugin.MojoExecutionException;
import org.jetbrains.jet.cli.common.CompilerArguments;
import org.jetbrains.jet.cli.jvm.K2JVMCompilerArguments;
import org.jetbrains.jet.cli.jvm.K2JVMCompiler;
import org.jetbrains.kotlin.doc.KDocArguments;
@@ -174,8 +175,10 @@ public class KDocMojo extends KotlinCompileMojoBase {
}
@Override
protected void configureCompilerArguments(K2JVMCompilerArguments arguments) throws MojoExecutionException {
configureBaseCompilerArguments(getLog(), arguments, docModule, sources, classpath, output);
protected void configureCompilerArguments(CompilerArguments arguments) throws MojoExecutionException {
if (arguments instanceof K2JVMCompilerArguments) {
configureBaseCompilerArguments(getLog(), (K2JVMCompilerArguments) arguments, docModule, sources, classpath, output);
}
if (arguments instanceof KDocArguments) {
KDocArguments kdoc = (KDocArguments) arguments;