Skip to content

Getting started (Eclipse)

John Ahlroos edited this page Feb 28, 2019 · 3 revisions

In this tutorial we'll go through how to create a new Vaadin Flow Gradle project using Eclipse.

Creating a new project

To create a new project go to File -> New -> Other... and select Gradle Project

Create project

One of the requirements of the Gradle Vaadin plugin is that it needs Gradle 5 so ensure when you create the project that you select a Gradle 5 version.

When you have finished the project creation wizard we should clean up the project a little before continuing.

Start by removing the src folder, it will be automatically created when we create the stub sources.

Next edit build.gradle and remove any content you have in it.

Clean project

We are now ready to create our project. To do that open up the build.gradle file and add the following content:

plugins {
    id 'com.devsoap.vaadin-flow' version '1.0'
    id 'org.gretty' version '2.3.1'
}

vaadin.autoconfigure()

Now we are ready to create the project sources. Go to the Gradle Tasks Window (If it is not visible you can find it under *Window -> Show View -> Other and select Gradle Tasks) and double click on the vaadinCreateProject task (You can search for it to find it quicker).

It will now create the project for you.

Initialize Vaadin project

Finally, to run the project we only need to double click on the jettyRun task under the gretty category in the Gradle Tasks window and you can run the project!

Run project

You can’t perform that action at this time.