I have an empty folder emptyFolder. When I run code locally (gradle) it works
this.getClass().getClassLoader().getResource(emptyFolder)
But when I run the same code in gitlab pipeline it returns null
All tasks before the running are the same
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :cleanTest
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources UP-TO-DATE
> Task :testClasses UP-TO-DATE
> Task :test
At the same time if I put any file in emptyFolder it works in gitlab pipeline as well. Looks like the issue happens when I use getResource() for empty directory only. But why I do not have the same issue during the local running? Could somebody help me to understand?