Building from Source

Landon Jobe edited this page Jan 10, 2018 · 15 revisions

Before you start building, please take note of our known issues.

Dependencies

The only dependencies for building MineCordBot are the following:

  1. Java 8 JDK - Oracle, OpenJDK
  2. BuildTools - (Semi-optional) Only needed for older versions of MineCordBot prior to 2.2.0.
  3. Git / Git for Windows - (Optional) Explicitly required by BuildTools, useful for cloning.

Building Minecordbot

To build MineCordBot you will need to clone the repository, or download an archive from the releases page. After that, you will need to run the build through the included Gradle Wrapper.

  1. Using your terminal (or GitBash), navigate to the directory you want to clone the repository. From here, you'll need to clone the repository as it shows on GitHub.
    $ cd ~/parent/directory/for/the/clone/
    $ git clone https://github.com/CyR1en/Minecordbot.git
  2. Branches and BuildTools
    • Optionally, you can switch to another currently existing branch. (ie: development)
      $ git checkout [Branch Name]
    • If building against MCB prior to 2.2.0, go ahead and run BuildTools now.
  3. Once you have cloned the repository, you can go ahead and run the Gradle Wrapper to build Minecordbot.
    • Windows
      • Run gradlew build from the Windows Command Line, or...
      • In GitBash, execute bash gradlew.sh build
    • Linux and Mac
      • Run /bin/bash gradlew build, or ./gradlew.sh build
      • You can also try to run it under sh (/bin/sh)
      • You may need to mark gradlew.sh as an executable file - chmod +x gradlew.sh (See the chmod manpage.)
  4. Grab the freshly built "Shaded" jar (./build/libs/Minecordbot-{version}-Shaded.jar) and place it in your server's plugins folder. Feel free to rename it.
  5. Refer to the Installation Page and test the build.

Be sure to report any bugs during build or installation that you see to the Issue Tracker.

Automated Scripts

There are two automated scripts available in the repository that wrap around the Gradle Wrapper - they are optional and only provided for your convenience.

  • build.bat
    • For use on Windows Exclusively
    • Non-interactive (Will run and close)
  • build.sh
    • For use on Linux and Mac with a BASH-compatible shell.
    • May need to be marked as an executable, depending on the system.
    • Can be ran on Windows through GitBash
    • Requires user intervention to exit when finished.
    • Allows reading the output if launched from a Graphical interface.

BuildTools Instructions

Since MineCordBot Version 2.2.0, Spigot's BuildTools is no longer required. Versions prior to this release required BuildTools to be ran at least once, against the Spigot 1.12 (--rev 1.12.1.) Please see the documentation linked: BuildTools Wiki.

Known Issues

  • Gradle will not grab all the files generated or pulled in by BuildTools when using the Windows Linux Subsystem.
  • Versions of MineCordBot before 2.1.0 do not support Discord's Channel Categories, and will treat them as channels. Building a pre-2.1.0 version is not recommended.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.