Skip to content

Commit 86ca5d0

Browse files
committed
Filter jars in Gradle class path resolver
1 parent 428178f commit 86ca5d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shared/src/main/kotlin/org/javacs/kt/classpath/GradleClassPathResolver.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ private fun readDependenciesViaGradleCLI(projectDirectory: Path, gradleScripts:
8181
val dependencies = findGradleCLIDependencies(command, projectDirectory)
8282
?.also { LOG.debug("Classpath for task {}", it) }
8383
.orEmpty()
84+
.filter { it.toString().toLowerCase().endsWith(".jar") } // Some Gradle plugins seem to cause this to output POMs, therefore filter JARs
85+
.toSet()
8486

8587
tmpScripts.forEach(Files::delete)
8688
return dependencies

0 commit comments

Comments
 (0)