Taskfile & Makefile Standards¶
Status: 🟢 Active | Owner: Engineering Enablement
Overview¶
Task (Taskfile) is the standard local developer task runner for all repositories. It provides a consistent developer interface regardless of the underlying build tool.
Why Taskfile over Makefile?¶
- Cross-platform (works on Windows, macOS, Linux without GNU Make).
- YAML syntax — readable and maintainable.
- Built-in variable interpolation and environment support.
- Task-level documentation.
Required Tasks¶
Every repository's Taskfile.yml must implement these standard tasks:
# Taskfile.yml
version: '3'
env:
APP_PORT: '8080'
tasks:
setup:
desc: First-time setup — install dependencies and configure environment
cmds:
- cp -n .env.example .env || true
- task: deps
- pre-commit install
- pre-commit install --hook-type commit-msg
deps:
desc: Install all project dependencies
cmds:
- ./gradlew dependencies # Java example
build:
desc: Build the project
cmds:
- ./gradlew build -x test
test:
desc: Run unit tests
cmds:
- ./gradlew test
test:integration:
desc: Run integration tests
cmds:
- ./gradlew integrationTest
test:e2e:
desc: Run end-to-end tests
cmds:
- npx playwright test
lint:
desc: Run all linters
cmds:
- ./gradlew checkstyleMain spotbugsMain
format:
desc: Auto-format all code
cmds:
- google-java-format --replace **/*.java
run:
desc: Start the service locally
deps: [infra:up]
cmds:
- ./gradlew bootRun
infra:up:
desc: Start local infrastructure (DB, Kafka, etc.)
cmds:
- docker compose up -d
infra:down:
desc: Stop local infrastructure
cmds:
- docker compose down
clean:
desc: Clean build outputs
cmds:
- ./gradlew clean
Running Tasks¶
task setup # First-time setup
task run # Start service
task test # Unit tests
task lint # Run linters
task --list # Show all available tasks
Last reviewed: 2025-Q4 | Owner: Engineering Enablement