makefile
The Makefile
What it is for
Nobody should have to know Gradle's task names to work on a service, and CI should not know a different set of commands from the ones a human runs. The Makefile is the single list of things you can do to the repository, and it is the answer to "how do I run the tests?" for both audiences.
The second half is what pays. When CI calls make lint and make build rather than assembling its own Gradle invocations, a green local build is a
green CI build — and when it is not, the failure reproduces with one command instead of a reading of the workflow file.
When the project has no Makefile
Most projects do not start with one, and its absence is not a problem to fix in passing. The trigger to raise it is a second hand-assembled
command: the moment you find yourself telling the user to run ./gradlew :report:koverHtmlReport :report:koverVerify, or reconstructing a Gradle
invocation a CI workflow already spells out, the file has earned its place.
Offer it, then wait. Say which targets you would add and that CI would call the same ones. Do not create a Makefile as a side effect of an
unrelated task — it is a change to how everyone runs the project, and a team using just, npm scripts, or plain Gradle aliases has already made this
decision differently.