-
Notifications
You must be signed in to change notification settings - Fork 6
Obtain the Source Code, Build and Test
JDK & Git must be installed and accessible.
You can use the gradle wrapper included (gradlew) instead of manually installing another gradle.
On Windows, open either Command Prompt or PowerShell, then run the following commands. Linux users should give the gradlew executable access before running gradlew: "chmod +x gradlew" and replace "gradlew.bat" with "./gradlew". For mac users, eplace "gradlew.bat" with "bash gradlew".
Commands
$ git clone https://github.com/RoyalAliceAcademyOfSciences/SimElectricity.git
$ git submodule update --init
$ cd SimElectricity/
$ gradlew.bat runData
Task "runData" will always return with fail, ignore it as it is normal. If you want to get the source of a previous version, run "git checkout branchname" before "git submodule update --init", where branchname can be 1.15.2, 1.12.2 e.t.c.
Since 1.15.2, Mojang introduces "DataGenerators", they generate json resource files such as blockstates and models. They are invoked separately. Before building or testing this Mod, you have to execute the gradle task "runData". Checkout: https://minecraft.gamepedia.com/Tutorials/Running_the_Data_Generator
Commands
$ gradlew build
You can collect artifacts at build\libs.
Commands
$ cd build/libs/
$ ls -l
Run either "gradlew.bat genEclipseRuns" or "gradlew.bat genIntellijRuns", depending on what IDE you are using (Eclipse or IDEA), and then import as a gradle project.