IntelliJ Setup: Difference between revisions
Jump to navigation
Jump to search
start of new build instructions |
/* Updated for GitHub |
||
Line 1: | Line 1: | ||
== KoLmafia has migrated to the GitHub repository and we are retooling for GIT and gradle builds. == | ==== KoLmafia has migrated to the GitHub repository and we are retooling for GIT and gradle builds. ==== | ||
Line 11: | Line 8: | ||
== Create a Project == | == Create a Project == | ||
=== | === Create a new project === | ||
# Start IntelliJ IDEA. In the ''Welcome to IntelliJ IDEA'' dialog, click '''Get from VCS'''.<br>[[File:Intellij-setup-c2021.2-welcome.png|300px]] | # Start IntelliJ IDEA. In the ''Welcome to IntelliJ IDEA'' dialog, click '''Get from VCS'''.<br>[[File:Intellij-setup-c2021.2-welcome.png|300px]] | ||
# In the ''Get from Version Control'' dialog, select the '''Repository URL''' tab. | # In the ''Get from Version Control'' dialog, select the '''Repository URL''' tab. | ||
## In ''Version control'', select ''' | ## In ''Version control'', select '''GitHub'''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs.png|300px]] | ||
## Add a new repository location. To do so, click the '''+''' button next to ''Repositories''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-subversion.png|300px]] | ## Add a new repository location. To do so, click the '''+''' button next to ''Repositories''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-subversion.png|300px]] | ||
## In the ''New Repository Location'' popup, enter the URL to KoLmafia's GitHub repository. If you have a GitHub account and a Personal Access Token, use git@github.com:kolmafia/kolmafia.git If you do not have a GitHub account, use https://github.com/kolmafia/kolmafia.git<br>[[File:Intellij-setup-c2021.2-new-repository-location.png|200px]] | |||
## Click '''OK''' to close the popup. | |||
## Once the repository has been added, '''click the repository URL to highlight it''', then click '''Check Out'''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-check-out.png|300px]] | ## Once the repository has been added, '''click the repository URL to highlight it''', then click '''Check Out'''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-check-out.png|300px]] | ||
# If the ''Destination Directory'' popup appears, choose a directory to check out the working copy.<br>''Caution'': Don't choose a common directory like <samp>C:\Users\<username>\Documents</samp>. Instead, create a new directory under it (by clicking the folder icon) and give it an appropriate name (e.g. <samp>kolmafia</samp>).<br>[[File:Intellij-setup-c2021.2-choose-working-copy-dir.png|200px]]<br>Click '''OK''' to continue. | # If the ''Destination Directory'' popup appears, choose a directory to check out the working copy.<br>''Caution'': Don't choose a common directory like <samp>C:\Users\<username>\Documents</samp>. Instead, create a new directory under it (by clicking the folder icon) and give it an appropriate name (e.g. <samp>kolmafia</samp>).<br>[[File:Intellij-setup-c2021.2-choose-working-copy-dir.png|200px]]<br>Click '''OK''' to continue. | ||
# IntelliJ will generate a new project. If it asks you whether to add <code>kolmafia.iml</code> to Subversion, you may click '''Cancel''' to skip it | |||
# IntelliJ will generate a new project. If it asks you whether to add <code>kolmafia.iml</code> to Subversion, you may click '''Cancel''' to skip it | |||
=== Add the | === Add the Gradle Build File === | ||
# Open the | # Open the Gradle Toolbar Item (typically on the right side, and not very large) | ||
# Click the '''+''' button to add a build file | # Click the '''+''' button to add a build file | ||
# Choose build. | # Choose build.gradle from the file selector and press Open | ||
== | === From the Gradle Menu, select Applications>run === | ||
Revision as of 03:39, 29 October 2021
KoLmafia has migrated to the GitHub repository and we are retooling for GIT and gradle builds.
IntelliJ IDEA is an IDE for developing Java applications. This guide assumes that you have a recent enough version of Java JDK, Ant, and IntelliJ IDEA. Completing Compiling from Source is a requirement for this guide, although experienced developers can skip to whatever step is appropriate.
The following instructions are based on IntelliJ IDEA 2021.2 Community Edition. Instructions for other versions/editions of IntelliJ may be slightly different.
Create a Project
Create a new project
- Start IntelliJ IDEA. In the Welcome to IntelliJ IDEA dialog, click Get from VCS.
- In the Get from Version Control dialog, select the Repository URL tab.
- In Version control, select GitHub.
- Add a new repository location. To do so, click the + button next to Repositories.
- In the New Repository Location popup, enter the URL to KoLmafia's GitHub repository. If you have a GitHub account and a Personal Access Token, use git@github.com:kolmafia/kolmafia.git If you do not have a GitHub account, use https://github.com/kolmafia/kolmafia.git
- Click OK to close the popup.
- Once the repository has been added, click the repository URL to highlight it, then click Check Out.
- In Version control, select GitHub.
- If the Destination Directory popup appears, choose a directory to check out the working copy.
Caution: Don't choose a common directory like C:\Users\<username>\Documents. Instead, create a new directory under it (by clicking the folder icon) and give it an appropriate name (e.g. kolmafia).
Click OK to continue. - IntelliJ will generate a new project. If it asks you whether to add
kolmafia.iml
to Subversion, you may click Cancel to skip it
Add the Gradle Build File
- Open the Gradle Toolbar Item (typically on the right side, and not very large)
- Click the + button to add a build file
- Choose build.gradle from the file selector and press Open