[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.KotlinJsDceOptions
|
||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsDceOptionsImpl
|
import org.jetbrains.kotlin.gradle.dsl.KotlinJsDceOptionsImpl
|
||||||
import org.jetbrains.kotlin.gradle.logging.GradleKotlinLogger
|
import org.jetbrains.kotlin.gradle.logging.GradleKotlinLogger
|
||||||
|
import org.jetbrains.kotlin.gradle.utils.canonicalPathWithoutExtension
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@CacheableTask
|
@CacheableTask
|
||||||
@@ -97,6 +98,6 @@ open class KotlinJsDce : AbstractKotlinCompileTool<K2JSDceArguments>(), KotlinJs
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return File("${file.nameWithoutExtension}.meta.js").exists()
|
return File("${file.canonicalPathWithoutExtension()}.meta.js").exists()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
@@ -43,3 +43,6 @@ internal fun File.isParentOf(childCandidate: File, strict: Boolean = false): Boo
|
|||||||
childCandidatePath.startsWith(parentPath)
|
childCandidatePath.startsWith(parentPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun File.canonicalPathWithoutExtension(): String =
|
||||||
|
canonicalPath.substringBeforeLast(".")
|
||||||
Reference in New Issue
Block a user