Attempting to build gradle from sources without git on windows path fails


(spencer_allain) #1

One could argue that maybe I should have git on my path since I clearly required it to check out the code, but I tend to set as few environment variables as possible, and generally specifically invoke the executables that I use.

If determineCommitId isn’t essential, then maybe it should skip gracefully, otherwise it could check for git during the setup phase rather than waiting for the execution phase.

:determineCommitId
'git' is not recognized as an internal or external command,
operable program or batch file.
:determineCommitId FAILED
  FAILURE: Build failed with an exception.
  * Where:
Script 'C:\Users\spencer\play\gradle\buildReceipt.gradle' line: 57
  * What went wrong:
Execution failed for task ':determineCommitId'.
> Process 'command 'cmd'' finished with non-zero exit value 1
  * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

This might not even be considered a “real” problem, and a very low priority one even if it is.

-Spencer


(Andrew Oberstar) #2

I’ve also run into this. When you check out from git, it’s a little more understandable, but it also breaks support for people just downloading a zip of the source from Github and being able to run the build. Seems like there could be an ‘onlyIf’ check on that task to see if git is available.


(Luke Daley) #3

This is already fixed for 1.2.


(spencer_allain) #4

Interesting. I pulled the latest from master just yesterday, and it wasn’t building for me prior to patching. Is there another branch that I should be pulling from that represents 1.2?

-Spencer


(spencer_allain) #5

No question remains. It appears it was my pull request that fixed it for 1.2 :slight_smile:

-Spencer


(Luke Daley) #6

‘master’ is now effectively 1.3, and the ‘release’ branch is 1.2.