Skip to content

Setup project locally

Daniel Tischner edited this page Sep 14, 2021 · 24 revisions

Overview

This tutorial shows how to download, setup and start the TJ-Bot project locally on your machine.

Prerequisites

What you will learn

  • use git to download the project
  • use gradle to download dependencies
  • use gradle to build the project
  • connect your bot to the program
  • use gradle to start the bot
  • interact with the bot from your server

Tutorial

Clone repository

First of all, you have to download the project to your machine. Visit the projects GitHub website and copy the .git link, which is this

https://github.com/Together-Java/TJ-Bot.git

.git link

IntelliJ git plugin

IntelliJ comes by default with a git plugin. You can easily clone repositories to your disk by clicking a few buttons.

  1. open your IntelliJ and select Get from VSC.
  2. select Git, enter the .git link and select a directory for the project; smack that Clone button
  3. IntelliJ will now open the project

Get from VSC IntellIJ UI .git url IntellIj UI

Manual usage of git

To download the project, use the following command:

git clone https://github.com/Together-Java/TJ-Bot.git TJ-Bot

You now have the project and all its data locally.

git clone command line TJ-Bot folder

Gradle

Next up, you have to download all the dependencies, generate the database and build the project.

IntelliJ Gradle plugin

IntelliJ comes by default with a gradle plugin. If not started already automatically, you can command it to do all of above by clicking a bunch of buttons.

  1. open the Gradle view
  2. expand the view and click on TJ-Bot > Tasks > build > build, or just click on the elephant icon and enter gradle build

Gradle tasks IntelliJ UI Gradle command IntelliJ UI Gradle output

Manual usage of gradle

You can also just execute Gradle from the command line.

  1. open a command line in the root directory of the project
  2. execute gradle build

Gradle command line start Gradle command line end

Clone this wiki locally