Skip to content

Development

PiggyPiglet edited this page Jun 15, 2021 · 4 revisions

Development

DocDex and all of its subprojects can be compiled with relative ease. First, ensure you have java 11.

Requirements

Windows

Download and install version 11 (or above) of the JDK, I recommend doing so via AdoptOpenJDK.

Unix (macOS/Linux)

Open your preferred terminal and run these commands individually:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh" # run this if you don't want to open a new terminal
sdk install java VERSION

Replace VERSION with the latest java 11 adoptopenjdk version (use the identifier) listed on sdk list java. Currently, the version is 11.0.11.hs-adpt
e.g. sdk install java 11.0.11.hs-adpt

Verification

Verify your install works by opening a new terminal, and running java -version. It should say the java version is 11 somewhere in the message.

Compilation

Once you've downloaded the project (via git clone, or the download button), depending on your OS, there's two ways to compile.

Windows

gradlew.bat shadowJar

Unix (macOS/Linux)

./gradlew shadowJar

Verification

The jars of each subproject will be in their respective folder, in build/libs. e.g. for the discord bot, the jar will be in discord/build/libs. As of right now, the only two jars that you'll ever need to use are app/build/libs, and discord/build/libs.