File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -171,16 +171,11 @@ val buildGraalVmReflectionJson = tasks.register("buildGraalVmReflectionJson") {
171171 println (" Generating GraalVM reflection config at: ${targetFile.absolutePath} " )
172172
173173 val classes = mutableListOf<String >()
174- classesDir.walkTopDown().filter { it.isFile && it.extension == " class" }.forEach {
175- val path = it.path
176-
177- val className = path
178- .substringAfter(sourcePackagePath)
179- .removePrefix(" /" )
180- .removePrefix(" \\ " )
174+ classesDir.walkTopDown().filter { it.isFile && it.extension == " class" }.forEach { file ->
175+ val relativePath = file.toRelativeString(classesDir)
176+ val className = relativePath
181177 .removeSuffix(" .class" )
182- .replace(" /" , " ." )
183- .replace(" \\ " , " ." )
178+ .replace(File .separatorChar, ' .' )
184179 classes.add(" $sourcePackage .$className " )
185180 }
186181 classes.sort()
You can’t perform that action at this time.
0 commit comments