[Gradle, JS] Add test on resolution of js project with directory dependency
^KT-43668 fixed
This commit is contained in:
+24
@@ -799,4 +799,28 @@ abstract class AbstractKotlin2JsGradlePluginIT(private val irBackend: Boolean) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testDirectoryDependencyNotFailProjectResolution() {
|
||||||
|
with(Project("kotlin-js-nodejs-project")) {
|
||||||
|
setupWorkingDir()
|
||||||
|
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||||
|
gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||||
|
|
||||||
|
gradleBuildScript().appendText(
|
||||||
|
"""${"\n"}
|
||||||
|
dependencies {
|
||||||
|
implementation(files("${"$"}{projectDir}/custom"))
|
||||||
|
implementation(files("${"$"}{projectDir}/custom2"))
|
||||||
|
}
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
|
||||||
|
build(
|
||||||
|
"packageJson"
|
||||||
|
) {
|
||||||
|
assertSuccessful()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -339,7 +339,8 @@ internal class KotlinCompilationNpmResolver(
|
|||||||
resolver.gradleNodeModules.get(it.dependency.moduleName, it.dependency.moduleVersion, it.artifact.file)
|
resolver.gradleNodeModules.get(it.dependency.moduleName, it.dependency.moduleVersion, it.artifact.file)
|
||||||
} + fileCollectionDependencies.flatMap { dependency ->
|
} + fileCollectionDependencies.flatMap { dependency ->
|
||||||
dependency.files
|
dependency.files
|
||||||
.filter { it.exists() && it.isFile }
|
// Gradle can hash with FileHasher only files and only existed files
|
||||||
|
.filter { it.isFile }
|
||||||
.map { file ->
|
.map { file ->
|
||||||
resolver.gradleNodeModules.get(
|
resolver.gradleNodeModules.get(
|
||||||
file.name,
|
file.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user