Building from source
Esc
Start typing to search...
how to
On this page

Building from source

Use these instructions if you are working on the editor or running it where you cannot use an installer, such as a build server, container, or CI job. To use DogsBay XML without building it, install a package.

Building

You need a JDK. You do not need to install Gradle: the gradlew script in the repository downloads the version the build expects, and the build downloads the JDK 25 toolchain it compiles against if your JDK is a different version.

bash
git clone https://github.com/dogsbay/dogsbay-xml
cd dogsbay-xml
./gradlew run

The first run takes noticeably longer than later ones, because it is fetching Gradle, possibly a JDK, and the project's dependencies.

TaskResult
./gradlew runStart the editor
./gradlew testRun the test suite
./gradlew shadowJarBuild the all-in-one JAR file
./gradlew jpackageBuild a native installer for the current platform

Running the command line from a checkout

The bin/dogsbay-xml script runs the CLI out of the build tree, so it needs the classes compiled and the libraries copied into lib/:

bash
./gradlew syncLib classes
bin/dogsbay-xml --help

Both are needed. syncLib alone copies the dependencies but compiles nothing, and the script runs from build/classes.

Running on a machine with no installer

Each release includes an all-in-one JAR file that contains the editor and its dependencies. The file requires only JDK 25 on the machine, so it is suitable for CI runners and containers that do not use an installer or desktop.

Download dogsbay-editor-<version>-all.jar from the releases page, then:

bash
java -cp dogsbay-editor-4.0.0-beta.1-all.jar \
  com.dogsbay.dogsbayaieditor.cli.DogsBayCli project-health .

The JAR file starts the editor when you use java -jar. Name the CLI class to run the command line instead. A shell alias shortens the command:

bash
alias dogsbay-xml='java -cp /opt/dogsbay-editor-all.jar com.dogsbay.dogsbayaieditor.cli.DogsBayCli'
dogsbay-xml validate-deliverables .

All commands in the command line reference work this way, except commands that control a running editor.