Fix build tool plugins after recent changes to CLI
This commit is contained in:
@@ -23,7 +23,7 @@ class HtmlVisitorTest {
|
||||
val args = K2JVMCompilerArguments()
|
||||
args.kotlinHome = "../../../dist/kotlinc"
|
||||
args.freeArgs = listOf(srcDir.toString())
|
||||
args.outputDir = File(dir, "target/classes-htmldocs").toString()
|
||||
args.destination = File(dir, "target/classes-htmldocs").toString()
|
||||
|
||||
val compiler = K2JVMCompiler()
|
||||
compiler.getCompilerPlugins().add(HtmlCompilerPlugin())
|
||||
|
||||
@@ -50,7 +50,7 @@ class KDocSampleTest {
|
||||
classesOutputDir.rmrf()
|
||||
classesOutputDir.mkdirsProperly()
|
||||
|
||||
args.outputDir = classesOutputDir.getPath()
|
||||
args.destination = classesOutputDir.getPath()
|
||||
|
||||
args.docConfig.docOutputDir = outputDir.getPath()
|
||||
args.docConfig.title = "Sample"
|
||||
|
||||
@@ -30,7 +30,7 @@ class KDocTest {
|
||||
args.freeArgs = listOf("../../stdlib/src",
|
||||
"../../kunit/src/main/kotlin",
|
||||
"../../kotlin-jdbc/src/main/kotlin")
|
||||
args.outputDir = "target/classes-stdlib"
|
||||
args.destination = "target/classes-stdlib"
|
||||
args.noStdlib = true
|
||||
args.classpath = "../runtime/target/kotlin-runtime-0.1-SNAPSHOT.jar${File.pathSeparator}../../lib/junit-4.9.jar"
|
||||
|
||||
|
||||
+3
-3
@@ -107,7 +107,7 @@ public open class KotlinCompile(): AbstractCompile() {
|
||||
args.classpath = effectiveClassPath
|
||||
}
|
||||
|
||||
args.outputDir = if (StringUtils.isEmpty(kotlinOptions.outputDir)) { kotlinDestinationDir?.getPath() } else { kotlinOptions.outputDir }
|
||||
args.destination = if (StringUtils.isEmpty(kotlinOptions.destination)) { kotlinDestinationDir?.getPath() } else { kotlinOptions.destination }
|
||||
|
||||
val embeddedAnnotations = getAnnotations(getProject(), getLogger())
|
||||
val userAnnotations = (kotlinOptions.annotations ?: "").split(File.pathSeparatorChar).toList()
|
||||
@@ -139,7 +139,7 @@ public open class KotlinCompile(): AbstractCompile() {
|
||||
|
||||
getLogger().debug("Copying resulting files to classes")
|
||||
// Copy kotlin classes to all classes directory
|
||||
val outputDirFile = File(args.outputDir!!)
|
||||
val outputDirFile = File(args.destination!!)
|
||||
if (outputDirFile.exists()) {
|
||||
FileUtils.copyDirectory(outputDirFile, getDestinationDir())
|
||||
}
|
||||
@@ -180,7 +180,7 @@ public open class KDoc(): SourceTask() {
|
||||
// KDoc compiler does not accept list of files as input. Try to pass directories instead.
|
||||
args.freeArgs = getSource().map { it.getParentFile()!!.getAbsolutePath() }
|
||||
// Drop compiled sources to temp. Why KDoc compiles anything after all?!
|
||||
args.outputDir = getTemporaryDir()?.getAbsolutePath()
|
||||
args.destination = getTemporaryDir()?.getAbsolutePath()
|
||||
|
||||
getLogger().warn(args.freeArgs.toString())
|
||||
val embeddedAnnotations = getAnnotations(getProject(), getLogger())
|
||||
|
||||
+1
-1
@@ -316,7 +316,7 @@ public abstract class KotlinCompileMojoBase extends AbstractMojo {
|
||||
}
|
||||
|
||||
log.info("Classes directory is " + output);
|
||||
arguments.outputDir = output;
|
||||
arguments.destination = output;
|
||||
|
||||
arguments.noJdkAnnotations = true;
|
||||
arguments.annotations = getFullAnnotationsPath(log, annotationPaths);
|
||||
|
||||
Reference in New Issue
Block a user