Difference between revisions of "IntelliJ Setup"

From Kolmafia
Jump to navigation Jump to search
imported>Mcroft
(Created page with "This is a stub for the full-blown instructions I am going to write. Right now, it's basically shortened from [https://kolmafia.us/showthread.php?25522-Request-refactor-build...")
 
imported>Mcroft
Line 1: Line 1:
This is a stub for the full-blown instructions I am going to write.
+
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.
  
Right now, it's basically shortened from [https://kolmafia.us/showthread.php?25522-Request-refactor-build-xml-to-support-IntelliJ-IDEA-(please-review)&p=159501&viewfull=1#post159501 this bug report].  The final version will have pictures and shit.
+
#From the IntelliJ IDEA File Menu, choose New>New Project from Existing sources
 
+
##Choose the directory with the kolmafia build.xml file and press Open
I created a new directory and did svn co from it.
+
##Choose Create Project from Existing Sources and press Next
 
+
##Enter the name KoLmafia and press Next
I imported project from existing sources. I accepted the defaults on the import.
+
##Verify that the project is visible to IDEA and press Finish
 
+
#Add the Ant Build File
I added build.xml to the ant tab.
+
## Open the Ant Toolbar item (typically on the right side, and not very large)
 
+
## Choose the + button to add a build file
I set up my run configuration as shown.
+
## Choose build.xml from the file selector and press Open
+ to add configuration, select "Application"
+
## Verify that a list of ANT targets appears in the Ant Toolbar
main class: net.sourceforge.kolmafia.KoLmafia
+
#Check Project Settings
Working directory:/Users/mcroft/Library/Application Support/KoLmafia
+
## From the File Menu, choose Project Structure...
(or wherever, this is important after launch...)
+
## Select Project on the Left Menu
Use classpath of module: kolmafia
+
### set the name to kolmafia
JRE: Default (or whatever)
+
### set the Project SDK to any SDK version 1.8 or higher
Before Launch:
+
### set the project language level to 8
Run Ant target 'set.released.false'
+
### set the project compiler output to build
Run Ant target 'set.version'
+
## Select Modules on the Left Menu
Build (not Build Project, just vanilla Build)
+
###
 
+
## Select Libraries on the Left Menu
Apply the config.
+
## Select Problems on the Left Menu (if the menu item shows any problems)
 +
## Press Apply
 +
## Press OK
 +
#Add Run/Debug Configuration

Revision as of 03:26, 14 October 2020

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.

  1. From the IntelliJ IDEA File Menu, choose New>New Project from Existing sources
    1. Choose the directory with the kolmafia build.xml file and press Open
    2. Choose Create Project from Existing Sources and press Next
    3. Enter the name KoLmafia and press Next
    4. Verify that the project is visible to IDEA and press Finish
  2. Add the Ant Build File
    1. Open the Ant Toolbar item (typically on the right side, and not very large)
    2. Choose the + button to add a build file
    3. Choose build.xml from the file selector and press Open
    4. Verify that a list of ANT targets appears in the Ant Toolbar
  3. Check Project Settings
    1. From the File Menu, choose Project Structure...
    2. Select Project on the Left Menu
      1. set the name to kolmafia
      2. set the Project SDK to any SDK version 1.8 or higher
      3. set the project language level to 8
      4. set the project compiler output to build
    3. Select Modules on the Left Menu
    4. Select Libraries on the Left Menu
    5. Select Problems on the Left Menu (if the menu item shows any problems)
    6. Press Apply
    7. Press OK
  4. Add Run/Debug Configuration