[Gradle, JS] Add check on run and dist task
- Check existence of compile output file to prevent fail in case of NO-SOURCE #KT-31894 fixed
This commit is contained in:
+7
@@ -22,6 +22,13 @@ open class NodeJsExec : AbstractExecTask<NodeJsExec>(NodeJsExec::class.java), Re
|
|||||||
@get:Internal
|
@get:Internal
|
||||||
override lateinit var compilation: KotlinJsCompilation
|
override lateinit var compilation: KotlinJsCompilation
|
||||||
|
|
||||||
|
init {
|
||||||
|
onlyIf {
|
||||||
|
compilation.compileKotlinTask.outputFile
|
||||||
|
.exists()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
var sourceMapStackTraces = true
|
var sourceMapStackTraces = true
|
||||||
|
|
||||||
|
|||||||
+6
@@ -56,6 +56,12 @@ open class KotlinWebpack : DefaultTask(), RequiresNpmDependencies {
|
|||||||
var entry: File? = null
|
var entry: File? = null
|
||||||
get() = field ?: compilation.compileKotlinTask.outputFile
|
get() = field ?: compilation.compileKotlinTask.outputFile
|
||||||
|
|
||||||
|
init {
|
||||||
|
onlyIf {
|
||||||
|
entry!!.exists()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
internal var resolveFromModulesFirst: Boolean = false
|
internal var resolveFromModulesFirst: Boolean = false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user