Skip to content

Getting started (Intellij IDEA)

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

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

Creating a new project

To create a new project go to File -> New -> New Project...

Create project

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

One of the requirements of the Gradle Vaadin plugin is that it needs Gradle 5.

To use it in our project we do not need to install it on our system, instead we are going to use the Gradle wrapper. At the time of writing when you create a new Gradle project it will create Gradle 4.x project so we will need to update the wrapper to the latest Gradle.

To update the Gradle wrapper, go to the right hand side Gradle panel, select Execute Gradle Task button (The elephant button) and execute the wrapper task with the wanted Gradle version.

Update gradle wrapper

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 right hand side Gradle tab and double click on the vaadinCreateProject task. 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 right Gradle navigation bar and you can run the project!

Run project

You can’t perform that action at this time.