Template for the project of the course MAC0218 - Programming Techniques II at University of São Paulo (@USP).
Galaxy Raiders is built in Kotlin, a modern programming language for the JVM (Java Virtual Machine) supporting object-oriented programming and functional programming. It uses Gradle as the official build tool.
To develop Galaxy Raiders, please install and use docker.
NOTE: This repo has gradle wrappers to ensure developers use the same version of gradle in every environment. However, using gradle's docker image already guarantees that. Therefore, commands below can use the
gradle
CLI directly.
Please also install pre-commit in your development environment to automatically format code and to detect bed smells before making new commits. By default, this integration also uses docker.
This project uses ktlint and detekt for static code analysis.
If you installed pre-commit, to execute the linters, run:
pre-commit run --all-files
Alternatively, to execute the linters manually, run:
docker compose --profile dev run --rm linter
The compilation of all classes and the generation of a runnable self-contained JAR is made "behind the scenes" by docker.
To build the development images, run:
docker compose --profile dev build
To build the production images, run:
docker compose --profile prod build
All tests in the project are developed using JUnit 5.
To execute all tests (with live reload), run:
docker compose --profile dev up tester
To execute the project in development mode (with live reload), run:
docker compose --profile dev up demo --build
To execute the project in production mode, run:
docker compose --profile prod up game --build
To find available gradle tasks, run:
docker compose --profile dev run --rm demo gradle --no-daemon tasks
To execute any task, run:
docker compose --profile dev run --rm demo gradle --no-daemon {task}