Mine-and-blade-admin / Battlegear2

GNU General Public License v3.0
54 stars 54 forks source link

Setting Up Dev Environment for Fork in Eclipse #225

Open Cowy733 opened 8 years ago

Cowy733 commented 8 years ago

A co-dev and I have been trying to set up a development environment for writing a fork of this project in Eclipse, but have had little luck and found the instructions for forking in the readme unclear. What is meant by "import the build.gradle file"? We had no trouble running gradle to generate an eclipse workspace in the files we downloaded from here, and we have been trying to get eclipse set up so that we can simply hit run and it will compile the mod and run minecraft with forge and the mod installed, but every way we can think of to make this happen causes errors. Can that be done, or must we build the mod manually every time we want to test it?

GotoLink commented 8 years ago

This can be done, and is the way I run the mod. Use whatever project files are generated by gradlew after the command to create a workspace for your IDE. Either ipr or project or idea or eclipse or *metadata... Then If necessary, create your run configuration by pointing at GradleStart.

Cowy733 commented 8 years ago

Thanks for the reply, though we are still unable to get it set up. I downloaded the files, opened a command prompt in the Battlegear2 folder, and ran gradlew setupDecompWorkspace Eclipse. This took a couple of minutes to complete, and generated an eclipse folder inside Battlegear2. I ran eclipse and instructed it to switch the workspace over to the eclipse folder generated by gradle, and this resulted in an empty workspace with a blank package manager. Could you perhaps carefully list the steps we should take to get set up?

GotoLink commented 8 years ago

You can try '''gradlew eclipse --refresh-dependencies''' as a separate command. If that fails, you can manually setup the sources folders by pointing the 'battlegear mod src' and 'src' folders, then search the dependencies in the gradle/minecraft cache folder.