Skip to content

Template for the API project of MAC0218 - Programming Techniques II at @usp

License

Notifications You must be signed in to change notification settings

joaovml/galaxy-raiders-api

 
 

Repository files navigation

Galaxy Raiders

Template for the project of the course MAC0218 - Programming Techniques II at University of São Paulo (@USP).

Development

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.

Linting

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

Compilation

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

Tests

All tests in the project are developed using JUnit 5.

To execute all tests (with live reload), run:

docker compose --profile dev up tester

Execution

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

Other tasks

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}

About

Template for the API project of MAC0218 - Programming Techniques II at @usp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 94.3%
  • Shell 3.0%
  • Dockerfile 2.7%