In a Gradle Quarkus application build, quarkusGenerateCode triggers a deprecation warning when sourcesJar is enabled
### Describe the bug

In a simple Quarkus app build, by simply enabling sources JAR, Gradle produces deprecation warnings:
```groovy
java {
    withSourcesJar()
}
```

This is a sample of the error:
`
Reason: Task ':app:sourcesJar' uses this output of task ':app:quarkusGenerateCode' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
`

### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

Reproducer: https://github.com/jskillin-idt/quarkusio-quarkus-issues-27259

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

Linux jacob-ubuntu-dev 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

### Output of `java -version`

openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-122.04) OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-122.04, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.11.2.Final

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

Gradle 7.4.1

### Additional information

_No response_
diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
index 398111194bf..a30ec2aa012 100644
--- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
+++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
@@ -233,6 +233,9 @@ private void registerTasks(Project project, QuarkusPluginExtension quarkusExt) {
                     SourceSet mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME);
                     SourceSet testSourceSet = sourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME);
 
+                    mainSourceSet.getJava().srcDirs(quarkusGenerateCode, quarkusGenerateCodeDev);
+                    testSourceSet.getJava().srcDirs(quarkusGenerateCodeTests);
+
                     quarkusGenerateCode.configure(task -> task.setSourcesDirectories(getSourcesParents(mainSourceSet)));
                     quarkusGenerateCodeDev.configure(task -> task.setSourcesDirectories(getSourcesParents(mainSourceSet)));
                     quarkusGenerateCodeTests.configure(task -> task.setSourcesDirectories(getSourcesParents(testSourceSet)));
['devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java']