Skip to content

Getting Started

Maxime edited this page Nov 4, 2019 · 13 revisions

Core dependencies

Openjdk-11

Before you do anything else, you should make sure openjdk-11 is installed and configured:

Arch Linux

sudo pacman -Sy jdk11-openjdk
sudo archlinux-java set java-11-openjdk

Windows

As usual, the windows setup is a little more up to your own discretion, but the easiest way is downloading the following installer and running it:

Gradle

Unless you are using Intellij as your IDE (see below), you will need Gradle to build and run the project.

TIP: It's not a bad idea to install gradle even if you are using Intellij, as you might want to run the project from the commandline without opening up your IDE.

Simply using the latest version should be fine.

Arch Linux

sudo pacman -Sy gradle

Windows

We can't really do better than the official installation instructions, so just follow this guide

Postgres database

Arch Linux

Install the postgresql package

sudo systemctl start postgresql.service
createdb telraam_dev
sudo -iu postgres
psql

>>> CREATE USER telraam_user WITH PASSWORD 'iAMs00perSecrEET';
>>> GRANT ALL PRIVILEGES ON DATABASE telraam_dev to telraam_user;

Windows

There is a prepackaged postgres installation by EDB which you can find [here][postres_win]

Setting up your development environment

Below you can find setup instructions for the most common editors. Following these is not required to build or work on the project, but are rather highly recommended steps to make the development experience as smooth as possible. Feel free to add any instructions for more obscure editors.

Jetbrains Intellij

If you don't know which editor/ide you would like to use, Intellij comes with the highest recommendation. It has extensive gradle integration (and it even manages your gradle install for you), a simply awesome debugger, and a very smooth linter plugin which syncs with the linter settings on the build server.

Plugins

It is highly recommended to install the SonarLint plugin. This will make sure your commits will pass the linter checks on the build server. Just search for it in the Plugin interface.

Setup:

  • Open the project folder (if you cloned the repo without providing a name, this folder will be called "Telraam")

  • Intellij should prompt you with the message that is has found a gradle script, and ask you to import it. Click Import gradle project.

    • if you missed the prompt, right-click on the build.gradle file and select import gradle project.
  • You should now see a Gradle toolbar on the right side of the screen, below the Ant and Database buttons. From here you can run any gradle task that is configured.

    • We have provided preset Intellij run configurations in this project, which you should be able to select in the dropdown on the top left, next to the green play button.
  • Try to run the project by either selecting the Telraam [run] configuration and clicking the play button, or by running the Telraam->Tasks->application->run task from the Gradle toolbar. (They do exactly the same thing.)

Clone this wiki locally