IntelliJ IDEA のセットアップ
この記事では SpongeAPI と、 Maven や Gradle といったビルドシステム を用いたプラグイン開発のための IntelliJ IDEA の設定方法を述べます。
Gradle
プロジェクトの作成
- IntelliJ IDEA を開きます。 
- Create New Projectをクリックします。
- ポップアップ中の - Gradleを選択し、- Nextをクリックします。
- Group ID, Artifact ID, Version を入力します。 - Group ID は通常、 Java パッケージ名に対応すべきです。詳細は 主要なプラグインのクラス を参照してください。 
- Artifact ID は通常、 - mypluginのように、先に選択した plugin ID に対応すべきです。
- Version を入力します。 
 
- Nextを二回押して、プロジェクトに名前をつけて、- Finishをクリックします。
ビルドスクリプトの編集
- ナビゲーターの - build.gradleを開き、依存関係を追加します。
- Edit the build script according to the instructions at Gradle の設定. 
- IntelliJ ウィンドウの右にある Gradle タブ を開き、更新ボタンを押します。 
- Gradle のセットアップが完了しました! プラグインのコーディングを始められます。 
プロジェクトのインポート
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:
- File > Openをクリックします
- プロジェクトの - build.gradleファイルに移動します。
- OK をクリックします 
Maven
プロジェクトの作成
- IntelliJ IDEA を開きます。 
- Create New Projectをクリックします。
- ポップアップ中の - Mavenを選択し、- Nextをクリックします。
- Group ID, Artifact ID, Version を入力します。 - Group ID は通常、 Java パッケージ名に対応すべきです。詳細は 主要なプラグインのクラス を参照してください。 
- Artifact ID は通常、 - mypluginのように、先に選択した plugin ID に対応すべきです。
- Version を入力します。 
 
- 次へをクリック。
- プロジェクト名を入力し、 - Finishをクリックします。
プロジェクト構成の編集
- ナビゲーターの - pom.xmlを開きます。
- Edit the build configuration according to the instructions at Maven の設定. 
- Maven プロジェクトを更新します。 
- 求められれば、 Maven の変更をインポートします。 
プロジェクトのインポート
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:
- File > Openをクリックします
- プロジェクトの - pom.xmlファイルに移動します。
- OK をクリックします 
Git Integration
JetBrains は、 Git integration のドキュメントを提供しています:
https://www.jetbrains.com/help/idea/using-git-integration.html