Skip to content

Developer Setup Guide

Henry Loenwind edited this page Oct 8, 2020 · 19 revisions

Full Setup Procedure:

  1. Download and install any of the following that are not already installed Java jdk (8 not 9) / Eclipse Oxygen / git / GitKraken (Optional but recommended).
  2. You need to check out 2 different projects from github. (Don't use eclipse git, use an external git client eg: gitkraken)
1:EnderCore (branch 1.12)
2:EnderIO (branch master)
  1. Make sure to fork the above repos to your own github account so you can make PRs (Pull Requests).
  2. After cloning projects locally you will have 2 folders (1 EnderCore and 1 EnderIO). Navigate to each folder with command prompt and run 'gradlew setupDecompWorkspace'. (Note: You can do this as last step from within Eclipse's task list, but you have to configure the internal gradle to allow 3GB of RAM.) (Note 2: You need to repeat this step every time one of the dependencies changes. Then right-click the Endercore and main Ender IO projects and select "Gradle>Refresh".)
  3. Navigate to the Ender IO folder (see previous step) and run 'gradlew ap:build cleanEclipseFactorypath eclipseFactorypath'. (Note: You can do this as last step from within Eclipse's task list.) (Note 2: You need to repeat this step every time the annotation processor (that's the sub-project "ap") changes. Then right-click the main Ender IO projects and select "Gradle>Refresh".)
  4. In the EnderIO directory, rename the file user.properties.example to user.properties
  5. Open up eclipse and create your workspace wherever you like
  6. For each of the 2 projects, use file>import then 'Gradle> Existing Gradle Project' and select the folder you checked out the project. (Note: This will create one EnderCore project and 8+ EnderIO projects in Eclipse.)
  7. Wait for your Gradle Projects to sync (takes a while)
  8. Right click the 8 EnderIO Projects in Eclipse then goto Properties> Java Code Style> and import the formatting settings for Clean Up, Code Templates, and Formatter. Then in Organize Imports, import the .importorder file from the doc/contribute folder of the base project (you can also do this globally for the workspace)
  9. While in properties also select Java Editor> Save Actions. Set to Format Edited Lines and Organize Imports.
  10. The last setting you better change for the whole workspace: The warnings settings can be found as screenshots in the ‘doc’ folder. No import/export feature available in Eclipse :-(

If your eclipse doesn't run the code generation (annotation processor): Open each sub-project's properties and navigate to Java Compiler>Annotation processor. Disable "Enable annotation processing", click "Apply", say that you don't want to rebuild. Then enable the checkbox and allow it to rebuild. This should only be needed once, after that a Gradle>Refresh will let Eclipse see any changed values. It just won't see changes to that one checkbox. Note that Eclipse's Package Explorer hides ".* Resources" by default---that's where the generated sources go. To see the, click "⠇" then Filters and toggle the very first element in the list.

Note: To run the game inside the development environment, you need to download the redstone flux api jar and put it into your run/mods folder manually. COFH core depends on it but we don't want it to be in the classpath.

Slightly outdated: See this in action: YouTube (thx to JoduWei)

Very outdated: See me stumbling through this process: YouTube (this leaves out 2 of the projects and steps 10 to 14)


Thx to 'First to Fall'

Clone this wiki locally