GWT module per component (to allow individual use) #537
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.
I have generated a custom GWT module definition for each component. This makes it possible for users to use individual components rather than being forced to take all the components. Using individual components can reduce compile times, as GWT only compiles source that is actually referenced.
A further improvement would be to move the component CSS into public folders under each component. I have not done that in this pull request, as I wanted to keep it simple and focused on just the module definitions.
I think it would also be possible to remove some of the interdependencies between modules. For example, the Utils module (package) currently has dependencies on CLDR (~23MB jar), NumberFormat, Collapsible, Forms, Popover, Style and Tree. A dependency like Utils to Tree can be severed by moving
ParentTreeItem
out of Utils into Tree. This would be a breaking change, so I have not made it or any other code changes.The biggest culprit in terms of compile times is the reference to the CLDR. It adds ~15 seconds to each compilation on my machine. It might be worth breaking the connection (e.g. with your own interfaces and adapters) to make the CLDR optional.