Tutorial 9. Exporting

Before you read, make sure you have seen the previous tutorial


Code is on github


Ok, so we know how to make stuff now. But how do we get that to the people.
In this tutorial, i will explain how.
First things first, we need to install gradle.
Download it here

It is not a standard installation, so i will explain how to install it.
Extract the zip somewhere. A new folder called Gralde-X.XX will appear. Place this in a conveiniant place. That place will be referenced as GradleDir from now on.
Open System properties (how to win 7 / win 8)
Now go to Advanced System Settings
Open Environmental Variables
Now, in the User Variables, create a new line.
Name: GRADLE_HOME
value: GradleDir (E.g. C:\Program Files (x86)\gradle-1.10)

Now, in system variables, find the path variable.
Click on edit. AT THE END, add a semicolumn, and paste %GRADLE_HOME%\bin
So, once again,
Something; %GRADLE_HOME%\bin;
Now open cmd, and run gradle –version.
If you see a version output, congratz, you didnt mess up!

So, lets start the ACTUAL tutorial :)

Inside your BaseFolder, add 2 new files.
build.gralde en build.properties. CHANGE THE EXTENTION!

a8a495693f347bf6196ca415d79bb1ec

Now, lets look into these files.

The comments in the file, will explain it

It all seems very complicated. But its an entirely new language. Therefor, i wont go into detail, but let’s just say this works.
NOTE: any version later then 10.12.0.1047 needs ForgeGradle 1.2
Change that in the buildscript (

Now the build.properties file is rather easy

Ofcourse you need to change the values to what your verions etc are

Last thing to do, is open a command prompt, and move to the BaseFolder (or shift rightclick on BaseFolder and select Open Commandprompt)

Now run

gradle build

And you are done. The jar is the one inside /build/libs, and is called something-universal-something

Back to List
Next tutorial


5 Responses to Tutorial 9. Exporting

  1. Freelancer95 says:

    This does not work with newer versions of Forge (past 1047 in fact) When you try and use the gradle build command it fails with.

    D:\Development\Minecraft Modding\Source\DynamicCombat>gradle build

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project ‘DynamicCombat’.
    > ForgeGradle 1.1 only works for Forge versions 10.12.0.967 – 10.12.0.1047

    * Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

    BUILD FAILED

    Total time: 8.736 secs

    D:\Development\Minecraft Modding\Source\DynamicCombat>

  2. Slider says:

    I guess i did something wrong, but i cant understand what.

    http://pastebin.com/zUn6CrZL

    This is my build.gradle http://pastebin.com/5fDSNSAq

    Can you help me?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">