Local setup
Configure your token
Copy the example environment file and add your Apple Maps Server API token:Open
.env and set:Build commands
The project uses Gradle. AMakefile provides shortcuts for the most common tasks.
Code style
This project uses Spotless to enforce consistent formatting. Before opening a PR, verify your changes pass the style check:Architecture overview
The codebase follows clean architecture with a strict dependency rule: dependencies point inward. Framework imports never appear in the domain layer.| Package | Responsibility |
|---|---|
domain/ | Pure Java logic. Immutable records with constructor validation. No Spring, no Jackson, no HTTP. |
adapters/ | Implements ports defined by the domain. Contains all HTTP and Jackson-specific code. |
cli/ | Parses command-line arguments and delegates to the SDK via AppleMaps.java. |
AppleMaps.java | The single public entry point for library consumers. |
When adding a new API operation, start in
domain/ with typed request and response records, then add the HTTP adapter in adapters/mapsserver/, and finally expose it on AppleMaps.java.PR guidelines
- One change per PR. Keep pull requests focused on a single bug fix or feature.
- Add tests. New functionality requires corresponding tests before the PR can be merged. Unit tests go in classes ending with
Test; integration tests go in classes ending withIT. - Pass the build. Run
./gradlew buildlocally and confirm it succeeds before pushing. - Update documentation. If your change affects public behavior, update the relevant docs pages.
- Descriptive commit messages. Write messages that explain why the change is being made, not just what was changed.
Reporting issues
When opening an issue, include:- A clear description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- Library version and Java version