gradle: Set a group and description for the `fatJar` task
Not only is this best practices, but otherwise the task does not appear in gradle tasks
and cannot easily be discovered by users wishing to build the project from source.
I noticed because that happened to me: I had never used gradle, and wished to build an executable JAR:
-
gradle build
andgradle jar
didn't produce anything I could run withjava -jar
, - I couldn't find any other relevant task in
gradle tasks
' output, - I checked the release process documentation, saw it involved getting a JAR from CI, and
- I checked
.gitlab-ci.yml
and finally found the correctgradle
invocation.
Obviously that was far from ideal, and I hope documenting the fatJar
task will save others having to piece this together.