[Gradle, JS] Fix check on Kotlin/JS modules from NPM in DCE
#KT-35198 fixed
This commit is contained in:
+2
-1
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJsDce
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsDceOptions
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsDceOptionsImpl
|
||||
import org.jetbrains.kotlin.gradle.logging.GradleKotlinLogger
|
||||
import org.jetbrains.kotlin.gradle.utils.canonicalPathWithoutExtension
|
||||
import java.io.File
|
||||
|
||||
@CacheableTask
|
||||
@@ -97,6 +98,6 @@ open class KotlinJsDce : AbstractKotlinCompileTool<K2JSDceArguments>(), KotlinJs
|
||||
return false
|
||||
}
|
||||
|
||||
return File("${file.nameWithoutExtension}.meta.js").exists()
|
||||
return File("${file.canonicalPathWithoutExtension()}.meta.js").exists()
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -42,4 +42,7 @@ internal fun File.isParentOf(childCandidate: File, strict: Boolean = false): Boo
|
||||
} else {
|
||||
childCandidatePath.startsWith(parentPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal fun File.canonicalPathWithoutExtension(): String =
|
||||
canonicalPath.substringBeforeLast(".")
|
||||
Reference in New Issue
Block a user