Build Setup
January 30, 2025 ยท View on GitHub
Prerequisites for Gradle
- Clone this repository
- Install Java 17 or higher. To check which version of Java is installed on your computer, type the following command in the terminal:
java --version. You can download Java from one of the following sources:- Eclipse Adoptium (Temurin) โ Open-source & widely used
- Amazon Corretto - AWS-supported, optimized for cloud
- Azul Zulu - Enterprise ready
- Microsoft Build of OpenJDK - Microsoft's JDK
- Oracle JDK - Official Java from Oracle
Building from the command line
To build the application, run ./gradlew clean build from the command line at the root of the project.
Building from IntelliJ IDE
To build the application simply click the hammer in the header section

Running unit tests
- Run the following command at the root of the project to run Java tests:
./gradlew test
Coding style
This project uses the Google Java Style. IDE plugins to automatically format your code in this style are here.
Verify proper Java code style via Spotless plugin:
./gradlew spotlessCheck
Apply style automatically via Spotless plugin:
./gradlew spotlessApply
Packaging JAR with all dependencies
To build a JAR that can run stand-alone without any additional classes on the classpath (sometimes called an "uber" or "fat" JAR), run:
./gradlew shadowJar
Packaging as Installable Application
NOTE: The installable application is under active development. It currently works best on Windows.
To build an installable application package appropriate for your operating system
(e.g. Windows, Mac OS, Linux), first make sure you have a recent version of the
JDK installed (ver >= 15) that includes jlink and jpackage. If you intend
to redistribute the built application publicly, make sure it's an OpenJDK
distribution (likely a recent build linked from https://openjdk.java.net/install/,
ok if it's built by Oracle) and NOT an Oracle commercial JDK, where license
and redistribution terms are murkier.
If building on Windows, have https://wixtoolset.org/ installed on your path for Windows Installer support. When installing WiX, if you get an error like:
WiX Toolset requires .NET Framework 3.5.1...
you can navigate to "Control Panel > All Control Panel Items > Programs and Features" and enable the Windows Features for .NET framework (stackoverflow).
To build the app and installer, run:
./gradlew clean jpackage
and look for the resulting application artifacts in:
./app/pkg/build/jpackage/
Generating Javadocs
To generate Javadocs for the project, run:
./gradlew aggregateJavadocs
Linking the validator jars
The jars for the validator are released to maven central. See the example project gtfs-validator-example for details on how to use these jars.