Repository: quarkusio/quarkus
Issue: CDI issue with avro after migration to Quarkus 2.7

### Describe the bug

We have a Quarkus application with **Java** and **Kotlin** sources.
This component contains an avro file used to produce messages for Kafka

Gradle build of this application works perfectly with Quarkus 2.6 (2.6.3.Final)
But after migration to Quarkus 2.7 (2.7.5.Final), gradle build fails with some dependencies injection issues (see below)

It seems that some classes generated from Kotlin sources are not found by @Inject annotation used in classes generated from Java sources.

If we remove avro generation from this component, gradle build works fine.


### Expected behavior

> Task :quarkusBuild
Caching disabled for task ':quarkusBuild' because:
  Build cache is disabled
Task ':quarkusBuild' is not up-to-date because:
  Task has failed previously.
building quarkus jar

> Task :quarkusBuild
Quarkus augmentation completed in 6991ms
:quarkusBuild (Thread[Execution worker for ':',5,main]) completed. Took 8.685 secs.
:assemble (Thread[Execution worker for ':',5,main]) started.

> Task :assemble
Skipping task ':assemble' as it has no actions.
:assemble (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:check (Thread[Execution worker for ':',5,main]) started.

> Task :check
Skipping task ':check' as it has no actions.
:check (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:build (Thread[Execution worker for ':',5,main]) started.

> Task :build
Skipping task ':build' as it has no actions.
:build (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.

BUILD SUCCESSFUL

### Actual behavior

> Task :quarkusBuild FAILED
:quarkusBuild (Thread[Execution worker for ':',5,main]) completed. Took 10.161 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 8 deployment problems:
Unsatisfied dependency for type xxx.xxx.MonitoringEventService and qualifiers [@Default]
        - java member: xxx.xxx.XxxxService#monitoringEventService
        - declared on CLASS bean [types=[xxx.xxx.XxxxService, java.lang.Object], qualifiers=[@Default, @Any], target=xxx.xxx.XxxxService]

### How to Reproduce?

_No response_

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

_No response_

### Output of `java -version`

11.0.10

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.7.5.Final

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

_No response_

### Additional information

_No response_

Changed files:
devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java

diff --git a/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java b/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java
index 8027eb438f7..89561b107a9 100644
--- a/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java
+++ b/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java
@@ -156,11 +156,12 @@ public static ResolvedDependency getProjectArtifact(Project project, LaunchMode
     private static void collectDestinationDirs(Collection<SourceDir> sources, final PathList.Builder paths) {
         for (SourceDir src : sources) {
             if (!Files.exists(src.getOutputDir())) {
-                return;
+                continue;
             }
+
             final Path path = src.getOutputDir();
             if (paths.contains(path)) {
-                return;
+                continue;
             }
             paths.add(path);
         }