Vaadin - Widgetsets compilation in Gradle-based projects


It’s 2018 and official Vaadin Docs have documentation on
how to use Add-ons in Maven project.
No sign of Gradle.

There is gradle-vaadin-plugin developed by single person on github, with several problems which make it very unstable and problematic to use.

  • doesn’t work with gradle 4.4.1+
  • interferes in dep. management / repo management.
  • current state of repo → doesn’t build

What are the options now? Will there be official gradle plugin to use or the build tool in 2018 for Vaadin projects is Maven?

Sorry to hear that the plugin has not worked for you. It always sucks when a build tool does not work out of the box!

Indeed it currently has some issues with latest versions of Gradle but if you can stay with pre-gradle version 4.4 for a while longer those issues should be resolved in the next maintenance version.

I’m not sure what you mean by the plugin interfering with dependency management though, but if you mean the issues recently reported related to Spring Dependency Management Gradle plugin then it is just a matter of aranging the plugins in the correct order and it should work. If there is something else then please make a ticket in the repository.

I agree with you fully that the guys over at Vaadin should have embraced Gradle years ago (believe me, I have tried! :D), but they seem to be blissfully content with Maven so it is up to the community to step up I guess. Or then put some money on the table so the business dweebs over at Vaadin start to salivate :stuck_out_tongue:

You can also use Gradle without the Gradle Vaadin Plugin of course, that is actually how the plugin started, I had a bunch of Gradle scripts I wanted to unify into a plugin and then just other people started using the plugin. But still today you can do that, you just have to then basically copy a lot of functionality the plugin provides. But then you have full control over what the plugin does. A third option is to fork the plugin on Github and build it yourself, the only thing you need to do is clone the repository and run
gradle jar
to get your own build of the plugin.

Hope you get those issues solved, its always nice to meet a fellow Gradle user!

Hi John,

Thanks for the reply and the efforts you put in supporting/developing plugin!

I didn’t give up to get it working, so I will be spending time on this weekend :slight_smile:

There were several issues which I didn’t identify to the root cause. One was causing one dependency to prevail over selected one by rule. DependencyInsight showed everything is fine, but in runtime it was completely different version of dep. inside. I will investigate more to find out the problems.