提交 932cf217 编写于 作者: I Ilya Goncharov

[Gradle, JS] Allow to change destDir only for separate task and name it destinationDir

#KT-38331 fixed
上级 7386408e
......@@ -60,7 +60,7 @@ abstract class DukatTask(
* Destination directory for files with converted declarations
*/
@get:OutputDirectory
abstract var destDir: File
abstract val destinationDir: File
@get:Internal
internal abstract val considerGeneratingFlag: Boolean
......@@ -72,12 +72,12 @@ abstract class DukatTask(
open fun run() {
nodeJs.npmResolutionManager.checkRequiredDependencies(this)
destDir.deleteRecursively()
destinationDir.deleteRecursively()
DukatRunner(
compilation,
dTsFiles,
destDir,
destinationDir,
qualifiedPackageName,
null,
operation
......
......@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.gradle.targets.js.dukat
import org.gradle.api.tasks.OutputDirectory
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation
import org.jetbrains.kotlin.gradle.targets.js.npm.npmProject
import org.jetbrains.kotlin.gradle.utils.property
import java.io.File
import javax.inject.Inject
......@@ -21,9 +20,8 @@ constructor(
override val considerGeneratingFlag: Boolean = true
@get:OutputDirectory
override var destDir: File by property {
compilation.npmProject.externalsDir
}
override val destinationDir: File
get() = compilation.npmProject.externalsDir
private val executor by lazy {
DukatExecutor(nodeJs, dts, compilation.npmProject, true, compareInputs = false)
......
......@@ -19,7 +19,7 @@ constructor(
override val considerGeneratingFlag: Boolean = false
@get:OutputDirectory
override var destDir: File by property {
override var destinationDir: File by property {
project.projectDir.resolve("externals")
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册