devsoap / ds-gradle-vaadin

Gradle plugin for building Vaadin Flow 10/11/12/13/14/15 apps
https://devsoap.com/gradle-vaadin-flow-plugin
Other
36 stars 13 forks source link

Support @CssImport in libraries / dependencies #312

Closed sascha-frinken closed 4 years ago

sascha-frinken commented 4 years ago

We have a base library that contains components annotated with @CssImport and also the according css files. When the library is used in our main project we get errors that the referenced css file cant't be found:

Validating CSS imports..
com.example.layout.ContentHeaderFooterLayout: No Css import with the name 'components/content-header-footer-layout.css' could be found. Import ignored.
Excluding excluded imports...

Our current workaround is to copy the css files to the main project. It would be great if the plugin would also check the classpath for those resources.

sascha-frinken commented 4 years ago

This is becoming more and more urgent for us as we are about to go live with an important project. We would like to take care of it ourselves, do you have some tips or ideas how to solve this? Appreciate your feedback.

johndevs commented 4 years ago

The way I see how this could be implemented:

The WrapCssTask already does most of this, mostly the reading of the files from the classpath needs to implemented and then reuse the existing implementation to wrap and copy the files.

I'm travelling this week so I won't probably have time to look at this this week, but I'll have a look next week.

sascha-frinken commented 4 years ago

Works like a charm. We really appreciate your effort on this.

johndevs commented 4 years ago

@sascha-frinken Good to hear it is working, thanks!