Forcing initializing compilejava if empty #44432
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Recreating #44410 because I messed up(Pull request that contains merge commits can not be merged))
Issue #44384 describes how the task quarkusAppPartsBuild fails in a multi-module project using gRPC with Kotlin. When initializing the project for the first time, the gRPC output has not been configured, and we are not including the compileJava source directory in the application model. This behavior has the following characteristics:
Because the Project Descriptor is instantiated during configuration time, we currently lack a reliable way to retrieve the expected outputs ahead of time. This PR mitigates this issue by creating a map of abstract collection tasks and destination directories. Then, in the Application Model task, if we detect that the source directories do not include "compileJava," we verify whether an output exists in the destination directory; if this condition is met, we add it as a source directory.
This PR also adds integration tests to simulate the original issue.