Bug Build error when not using Git

As an incorrigible weirdo who prefers Mercurial, I've checked out the Kolmafia repository using hg-git.

A build attempt then subsequently fails with
Code:
FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Users\Jan\Documents\KoL\kolmafia_build\kolmafia\build.gradle' line: 338

* What went wrong:
A problem occurred evaluating root project 'KoLmafia'.
> Cannot invoke method log() on null object

The problem seems to be that while the getRevision() task in the gradle build file is being gated on file('.git').exists(), the pruneDist task, too, makes a call to isDirty() and thereby pulls in the dependency on actually having Git available after all. It's not a big issue as I can work around it by commenting out that bit, but just wanted to mention it, since as per this post Git isn't supposed to be an official build requirement?
 

heeheehee

Developer
Staff member
Right now it only works with a local git repo, whether you have the git CLI tool or not.

I suppose we could make it work with a hg clone of a git repo. I haven't used hg much in the past, and I most likely won't have time to look into adding this feature myself, but if any of the other devs get around to it (or if you feel like contributing a PR), I'd be happy to review any changes.
 
Top