-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow Gradle builds to use custom sourcesets (#15739)
When a sourceset other than `main` is used for holding classes using Vaadin components, or for providing a resolution scope for Vaadin dependencies, the `prepareVaadinFrontend` task does not correctly extract the correct Node libraries required by those classes, and the `buildVaadinFrontend` task subsequently fails to complete due to Vite requiring those Node dependencies to have been extracted into the project so failing to find all of its front-end dependencies. The `VaadinFlowPluginExtension` is being altered to include a `sourceSetName` field, that defaults to `main` for backwards compatibility but allows users to specify a custom sourceset to use for the prepare and build tasks. As the use of a custom sourceset generally implies that different Gradle tasks will be executed for operating on those sourcesets, and a different dependency scope generated for the custom sourceset, fields have also been added to the extension that allow users to override the values the plugin uses, whilst the default values follow the Gradle conventions for both `main` and non-`main` sourcesets. Fixes #15738
- Loading branch information
Showing
6 changed files
with
157 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters