IntelliJ IDEA Instellen

This article describes how to configure your IntelliJ IDEA workspace for plugin development with SpongeAPI and a build system such as Maven or Gradle.

Gradle

Creating your project

  • Open IntelliJ IDEA.

  • Klik op Create New Project.

  • Selecteer Gradle in de popup en klik op Next.

  • Vul de Group ID, Artifact ID en Version in.

    • Your Group ID should usually correspond to your Java package name. See Hoofdklasse uw plugin for details.

    • Your Artifact ID should usually correspond to your plugin ID you chose earlier, e.g. myplugin.

    • Je Versie hangt van jou af.

  • Klik tweemaal op Next, geef uw project een naam en klik op Finish.

Editing the build script

  • Open build.gradle in de navigator en voeg de dependencies toe.

  • Edit the build script according to the instructions at Setting Up Gradle.

  • Open het Gradle tabblad aan de rechterkant van het IntelliJ venster en druk op de refresh knop.

  • Gradle setup is voltooid! Nu kunt u beginnen met het ontwikkelen van uw plugin.

Importing your project

If you’ve already started with your project and want to import it again at a later point you need to import it instead of re-creating it inside your IDE:

  • Click File > Open

  • Navigate to the project’s build.gradle file

  • Click Ok

Maven

Creating your project

  • Open IntelliJ IDEA.

  • Klik op Create New Project.

  • Selecteer Maven in de popup en klik op Next.

  • Vul de Group ID, Artifact ID en Version in.

    • Your Group ID should usually correspond to your Java package name. See Hoofdklasse uw plugin for details.

    • Your Artifact ID should usually correspond to your plugin ID you chose earlier, e.g. myplugin.

    • Je Versie hangt van jou af.

  • Klik op Next.

  • Vul de naam van je project in en klik op Finish.

Editing the project configuration

  • Open pom.xml in de navigator.

  • Edit the build configuration according to the instructions at Setting Up Maven.

  • Refresh your Maven project.

  • Importeer de veranderingen van Maven wanneer dit wordt gevraagd.

Importing your project

If you’ve already started with your project and want to import it again at a later point you need to import it instead of re-creating it inside your IDE:

  • Click File > Open

  • Navigate to the project’s pom.xml file

  • Click Ok

Git Integratie

JetBrains biedt documentatie aan voor Git integratie:

https://www.jetbrains.com/help/idea/using-git-integration.html