- 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
To build the application, run ./gradlew clean build
from the command line at the root of the project.
To build the application simply click the hammer in the header section
- Run the following command at the root of the project to run Java tests:
./gradlew test
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
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
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/
To generate Javadocs for the project, run:
./gradlew aggregateJavadocs
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.