From 9ee1093e5747897476cd69845d0938089974c924 Mon Sep 17 00:00:00 2001 From: Romain Rochegude Date: Wed, 6 May 2020 16:25:13 +0200 Subject: [PATCH] Fix reflection issue inside gradle plugin --- .../plantuml/tasks/BuildClassDiagramTask.groovy | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/com/github/roroche/plantuml/tasks/BuildClassDiagramTask.groovy b/src/main/groovy/com/github/roroche/plantuml/tasks/BuildClassDiagramTask.groovy index d326854..92901f5 100644 --- a/src/main/groovy/com/github/roroche/plantuml/tasks/BuildClassDiagramTask.groovy +++ b/src/main/groovy/com/github/roroche/plantuml/tasks/BuildClassDiagramTask.groovy @@ -42,10 +42,18 @@ class BuildClassDiagramTask extends DefaultTask implements CustomTask { "Classes to ignore: {}", extension.ignoredClasses ) + getLogger().lifecycle( + "URLs to scan: " + project.sourceSets.main.output.classesDirs.files + ) final URL[] urls = project.sourceSets.main.output.classesDirs.files.collect { File dir -> dir.listFiles() }.flatten().collect { - it.toURI().toURL() + getLogger().lifecycle( + "File?: " + it + ) + if(it != null) { + it.toURI().toURL() + } } as URL[] getLogger().lifecycle( "URLs to scan: " + urls