Vaadin 14 + Gradle (migration from Vaadin 13)


I’m in the process of migrating a Vaadin application from V13 to V14 and the project uses Gradle as the build system. However, at the moment it is not using the [vaadin-gradle-plugin]
( Instead, the Vaadin dependencies are managed manually. I came across the section in the [v14-migration-guide]
( that mentions the Vaadin Maven plugin and was wondering how to do this in/with Gradle:


Does someone know how to approach this with Gradle? At the moment it just seems to be working without this part, but I guess there is a reason for it being mentioned in the migration guide.

Additionally, is this already or will this (in the final release) be handled by the Vaadin Gradle plugin? Any information on this?

Hi! With Vaadin 14 in the compatibility mode, the client-side stuff was downloaded by Gradle (the -webjar.jars), and so no further compilation steps were necessary. However, with the new NPM mode the client-side is compiled/packaged with webpack, and so a specialized plugin is necessary.

There is an alpha release of the Vaadin Gradle Plugin - please feel free to give it a go and let us know whether it works for you :slight_smile: Please find the example project here: and the plugin itself here:

Hi Martin! Thanks for your feedback. Actually, a few days after posting this I wanted to give the vaadin-gradle-plugin a try. With my setup, though, I’m currently not able to make it work.

At the moment I’m using Java 13 in conjunction with Gradle 4.10.3. As Gradle 5.6.4 is recommended in the vaadin-gralde-plugin documentation, I upgraded to that version but it seems that something has changed between these two versions as I’m no longer able to build my project under Gradle 5.6.4. (I cannot recall whether the vaadin-gralde-plugin was active or not, though.) This might be related: []

I just noticed that the plugin has been updated recently. I think I will give it another try in the next days. I’ll keep you posted here.

So here’s an update:

I gave the Vaadin Gradle Plugin another try (v0.5.0). Because I use Java 13 I had to update to Gradle 6.x. Now with Gradle 6.1.1 I’m able to successfully open and build the project. But there’s still a problem.

Since I use Guice as a DI framework ([Guice Vaadin]
( makes it really easy to use Guice with Vaadin), I have an additional Gradle source set configured to keep the main sources separated from the Guice sources. This causes a circular dependency between Gradle tasks when executing the vaadinBuildFrontend task. So at the moment I would only be able to use the plugin for development but not for building for production, which is a bit unfortunate. I already created an issue for that on Github where I also provide a project with an exemplary configuration: []
( I’m not quite sure if this is something that can be “fixed” by adjusting the plugin’s behavior. Maybe someone here has an idea for a workaround?

Another update for anyone curious:

The issue was fixed about 3 weeks ago. With the new Version of the Vaadin Gralde Plugin (v0.6.0) it’s now working.