Konfigurowanie IntelliJ IDEA

Ten artykuł opisuje, jak skonfigurować Twój obszar roboczy w IntelliJ IDEA do tworzenia pluginów (wtyczek) z SpongeAPI i systemem kompilacji, takim jak Maven czy Gradle.

Gradle

Tworzenie twojego projektu

  • Otwórz IntelliJ IDEA.

  • Kliknij Create New Project.

  • Wybierz Gradle w wyskakującym okienku i kliknij Next.

  • Enter your Group ID, Artifact ID, and Version.

    • Your Group ID should usually correspond to your Java package name. See Główna Klasa Pluginu for details.

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

    • Twoja Wersja zależy do Ciebie.

  • Click Next twice, name your project, and click Finish.

Editing the build script

  • Open build.gradle in the navigator and add the dependencies.

  • Edytuj skrypt kompilacji zgodnie z instrukcjami podanymi w Konfigurowanie Gradle.

  • Open the Gradle tab on the right of the IntelliJ window and hit the refresh button.

  • Gradle setup is done! Now you can start coding your plugin.

Importowanie twojego projektu

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:

  • Kliknij File > Open

  • Przejdź do pliku «» build.gradle»» projektu

  • Kliknij Ok

Maven

Tworzenie twojego projektu

  • Otwórz IntelliJ IDEA.

  • Kliknij Create New Project.

  • Wybierz Maven w wyskakującym oknie, i kliknij Next.

  • Enter your Group ID, Artifact ID, and Version.

    • Your Group ID should usually correspond to your Java package name. See Główna Klasa Pluginu for details.

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

    • Twoja Wersja zależy do Ciebie.

  • Kliknij Next.

  • Enter your project’s name, and click Finish.

Edytowanie konfiguracji projektu

  • Otwórz pom.xml w nawigatorze.

  • Edit the build configuration according to the instructions at Konfigurowanie Maven.

  • Refresh your Maven project.

  • Import the Maven changes, if prompted.

Importowanie twojego projektu

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:

  • Kliknij File > Open

  • Przejdź do pliku pom.xml projektu

  • Kliknij Ok

Integracja Git

JetBrains oferuje dokumentację dotyczącą integracji Git:

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