Adding Kotlin Tests Breaks Kotlin/Java project
### Describe the bug

I posted a more in-depth description of the issue here last night:
<https://github.com/quarkusio/quarkus/discussions/30049>

The summary is: Adding a Kotlin test file breaks `quarkus dev`. Some of my resources mysteriously disappear and aren't available at runtime.

### Expected behavior

I should be able to mix Java and Kotlin code in the same project and have everything work. One of the great advantages of Kotlin is that it's usually easy to gradually introduce it to a project without rewriting everything.

(read: I'll have a *much* easier time getting my team to adopt this if Java and Kotlin play well together. 😄)   

### Actual behavior

Adding a(n empty!) Kotlin test file causes some of my resources to be (silently!) unavailable while running `quarkus dev`.



### How to Reproduce?

```
> quarkus version
2.15.1.Final

> quarkus create app org.acme:rest-example --extension='resteasy-reactive-jackson' --gradle-kotlin-dsl
> cd rest-example
> quarkus dev

# At this point, the example code works. 
# can access http://localhost:8080/hello

# Save state:
> git init .
> git add .
> git commit -m "initial code"


> quarkus extension add kotlin
```

You'll also need to add Kotlin config to your build.gradle.kts as documented in:
<https://quarkus.io/guides/kotlin#important-gradle-configuration-points>

Now add a new REST endpoint in Kotlin so we can show how Java/Kotlin code 
*should* work together.

```kotlin
// file: src/main/kotlin/org/acme/KotlinGreeting.kt

package org.acme

import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType

@Path("/hello2")
class KotlinGreeting(
    private var javaResource: GreetingResource
) {
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    fun hello(): String {
        return "${javaResource.hello()} -- now in Kotlin!"
    }
}
```

Verify this works by running `quarkus dev` and visiting 
`http://localhost:8080/hello2`. 

```
> git add .
> git commit -m "checkpoint: Java + Kotlin working"
```

Now add a new "test" file.  (No actual test necessary)

```kotlin
// file: test/kotlin/org/acme/KotlinGreetingTest.kt

package org.acme

// This file left intentionally blank.
```

Once again run `quarkus dev`.

While the server starts up without error, neither `/hello` nor `/hello2`
resources are loaded. And there are no errors to let you know something has gone
wrong.

```
> git add .
> git commit -m "checkpoint: broken"
```

I'll attach the zip file (including git history) here.

[rest-example.zip](https://github.com/quarkusio/quarkus/files/10296136/rest-example.zip)


### Output of `uname -a` or `ver`

Windows. :p  But I also originally bumped into this on macOS.

### Output of `java -version`

openjdk version "16.0.2" 2021-07-20

### GraalVM version (if different from Java)

n/a

### Quarkus version or git rev

2.15.1.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Gradle 7.5.1

### Additional information

_No response_
diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java
index e248cfc79fe..9a3ebcf051b 100644
--- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java
+++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java
@@ -571,7 +571,7 @@ private void addLocalProject(ResolvedDependency project, GradleDevModeLauncher.B
             }
         }
         Path classesDir = classesDirs.isEmpty() ? null
-                : QuarkusGradleUtils.mergeClassesDirs(classesDirs, project.getWorkspaceModule().getBuildDir(), root, root);
+                : QuarkusGradleUtils.mergeClassesDirs(classesDirs, project.getWorkspaceModule().getBuildDir(), root, false);
 
         final Set<Path> resourcesSrcDirs = new LinkedHashSet<>();
         // resourcesSrcDir may exist but if it's empty the resources output dir won't be created
['devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java']