[Gradle, JS] Allow to change destDir only for separate task and name it destinationDir
#KT-38331 fixed
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
+2
-4
@@ -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)
|
||||
|
||||
+1
-1
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user