Gradle users have traditionally been "second-class citizens" as Vaadin users. We received many requests to provide official Gradle support in our most recent community survey. The Gradle build plugin was a community effort (even though it was sponsored by Vaadin), and Vaadin project creation on our web site only supports Maven builds. This is going to change. As the first step in this direction, I'm happy to announce that a new Vaadin-branded Gradle plugin is now available for early adopters.
The new plugin is basically a re-write
The old community-built Gradle Plugin had a massive set of features, and it supported many Vaadin versions. On the downside, it didn't play well with the latest Vaadin 14 series. To get the new version out ASAP, we decided to support only the latest LTS (Vaadin 14 series) and only the npm mode. So if you use an older version of Vaadin, you should continue with the community plugin. Also, like with the Maven plugin, the Gradle plugin now only takes care of front-end builds, and not, for example, project creation or code templates.
In addition to vaadinPrepareFrontend and vaadinBuildFrontend tasks, which you use to get front-end resources properly packaged, we added vaadinPrepareNode that installs a local Node.js to your project. This makes it easier to build your Vaadin projects on the CI server and to make sure you use the correct Node version locally.
The project page has links to example projects and rudimentary documentation to get you started.
What next?
We are really grateful to the group of active community members who have tried the plugin and provided feedback. Before declaring the new plugin stable, we still want to improve the documentation and get the thumb ups from a wider group of community members. If you prefer Gradle to Maven, please try it out and report all issues via the project page. When we are comfortable with the stability of the new plugin, we'll make it an official Vaadin product, so that, our Warranty applies to the plugin as well, for example.
At the same time, we will look into adding an option to the basic starters, so that you can choose between Gradle and Maven. We do not intend to maintain Gradle versions of all our demo applications, but the actual beef of the example apps should be applicable (read: copy-pastable) to Gradle projects too.