Skip to content

Commit

Permalink
Merge pull request #17716 from glefloch/fix/17706
Browse files Browse the repository at this point in the history
Fix generatedCode output dir
  • Loading branch information
aloubyansky authored Jun 6, 2021
2 parents 9d38a3b + d8fd0b9 commit c8cd44a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8cd44a

Please sign in to comment.