Repository: quarkusio/quarkus
Issue: 2.0.0.CR3 gradle `quarkus-generated-sources` in wrong place

## Describe the bug
Building project with gradle with version 2.0.0.CR3 creates `quarkus-generated-sources` and `quarkus-test-generated-sources` empty directories at the module level. I believe they must be created under `build` directory

### Expected behavior
All build directories appear under `build` directory

### Actual behavior
Empty directories appear after `./gradlew clean build`


## To Reproduce
Steps to reproduce the behavior:
1. Checkout this repo - https://github.com/Shohou/quarkus-liquibase-bug (nevermind the name, created for #17523)
2. in master branch run `./gradlew clean build`
3. Check under `db` directory. Two new empty directories appear there
4. Same under `quark` module


Changed files:
devtools/gradle/src/main/java/io/quarkus/gradle/QuarkusPlugin.java, devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusGenerateCode.java

diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/QuarkusPlugin.java b/devtools/gradle/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
index f1a8c420e5b..68c30b0de12 100644
--- a/devtools/gradle/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
+++ b/devtools/gradle/src/main/java/io/quarkus/gradle/QuarkusPlugin.java
@@ -217,11 +217,7 @@ public void execute(Task test) {
                     tasks.withType(Test.class).whenTaskAdded(configureTestTask::accept);
 
                     SourceSet generatedSourceSet = sourceSets.create(QuarkusGenerateCode.QUARKUS_GENERATED_SOURCES);
-                    generatedSourceSet.getOutput()
-                            .dir(QuarkusGenerateCode.QUARKUS_GENERATED_SOURCES);
                     SourceSet generatedTestSourceSet = sourceSets.create(QuarkusGenerateCode.QUARKUS_TEST_GENERATED_SOURCES);
-                    generatedTestSourceSet.getOutput()
-                            .dir(QuarkusGenerateCode.QUARKUS_TEST_GENERATED_SOURCES);
 
                     // Register the quarkus-generated-code
                     for (String provider : QuarkusGenerateCode.CODE_GENERATION_PROVIDER) {
diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusGenerateCode.java b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusGenerateCode.java
index e34da5d08d7..cb291cb5c6c 100644
--- a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusGenerateCode.java
+++ b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusGenerateCode.java
@@ -20,7 +20,7 @@
 import org.gradle.api.plugins.JavaPluginConvention;
 import org.gradle.api.tasks.CompileClasspath;
 import org.gradle.api.tasks.InputFiles;
-import org.gradle.api.tasks.OutputDirectories;
+import org.gradle.api.tasks.OutputDirectory;
 import org.gradle.api.tasks.SourceSet;
 import org.gradle.api.tasks.TaskAction;
 
@@ -78,10 +78,10 @@ public Set<File> getInputDirectory() {
         return inputDirectories;
     }
 
-    @OutputDirectories
-    public FileCollection getGeneratedOutputDirectory() {
+    @OutputDirectory
+    public File getGeneratedOutputDirectory() {
         final String generatedSourceSetName = test ? QUARKUS_TEST_GENERATED_SOURCES : QUARKUS_GENERATED_SOURCES;
-        return QuarkusGradleUtils.getSourceSet(getProject(), generatedSourceSetName).getOutput().getDirs();
+        return QuarkusGradleUtils.getSourceSet(getProject(), generatedSourceSetName).getJava().getOutputDir();
     }
 
     @TaskAction