This guide will help you set up Java to run and test this project on your Mac.
# Install Java 17 (LTS version)
brew install openjdk@17
# Link it so it's available system-wide
sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
# Add to your PATH (adds to ~/.zshrc)
echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc
echo 'export JAVA_HOME="/opt/homebrew/opt/openjdk@17"' >> ~/.zshrc
source ~/.zshrc- Visit https://adoptium.net/
- Download "Temurin 17 (LTS)" for macOS
- Install the downloaded .pkg file
- Set JAVA_HOME:
# Add to ~/.zshrc
echo 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home' >> ~/.zshrc
source ~/.zshrcjava -version
javac -versionYou should see Java version 17 or higher.
This project uses Gradle with a wrapper script, so you don't need to install Gradle separately.
# Run all tests
./gradlew test
# Run a specific test
./gradlew test --tests CustomersTest
# Build the project
./gradlew buildchmod +x gradlewMake sure JAVA_HOME is set:
echo $JAVA_HOMEIf empty, add to ~/.zshrc:
export JAVA_HOME=$(/usr/libexec/java_home)
source ~/.zshrcsudo chown -R $(whoami) /opt/homebrew- See
RUNNING_TESTS.mdfor detailed test commands - Test results are in
build/reports/tests/test/index.html