Shared custom theme in multi-module project

Hi!

In Vaadin 8 we have a few applications which use a shared custom theme.

How can I manage this in Vaadin 14? If I make a theme maven project (JAR) which contains a CustomTheme (implementing the AbstractTheme) which contains the styles, custom font and so on how can I use / import these CSS and JS files in another application? If I have a shared JS (or CSS) I have to annotate the CustomTheme? I know I have to make JS for every component to style (like vaadin-button.js, vaadin-textfield.js and so on), but what have to do with the common style (global style, like custom font settings, custom colors, etc.)?
And what @CssImport or @JsModule or whatever have to use in the web application (where I have the custom-theme dependency)? Where to put them? I have to build the theme files into an npm package and then I can use it?

I read multiple times the documentation, the Theme tutorial, the learning V14 Theme video (the V10 theming too), but none of them mention a proper example how to build a CustomTheme JAR to reuse in other applications! I’m stucked, tired and dissapointed (for weeks) :frowning:

Any help would be great, thanks in advance!
Károly

I assume this question in StackOverflow is by you, I wrote answer there:

https://stackoverflow.com/questions/62115872/vaadin-flow-and-external-css-theme/62263917#62263917