Tips for gradle/emacs compilation mode integration


(Alan Beale) #1

After the most recent NFJS conference, Matt and Tim encouraged me to post my gradle/emacs integration scheme for compiles

Starting point for integration between gradle and compilation mode in emacs.

  1. set add a regexp for the compilation mode so that emacs can recognize gradle output.

For Gnu emacs this works (add-to-list

'compilation-error-regexp-alist

'("^\[ERROR\] \(.*\):\[\([0-9]+\),\([0-9]+\)\]" 1 2 3))

for a little more information see

http://praveen.kumar.in/2011/03/09/making-gnu-emacs-detect-custom-error-messages-a-maven-example

Add a command so that emacs can find your gradle build file. This provides functionality similar to ant -s.

https://github.com/bealeaj1214/elisp-personal/blob/master/gradle-compile.el


(Matthew McCullough) #2

Very impressive. I see you turned on -q to avoid the issue with the inability to parse the status line because of the continual re-writing for progress.


(Richard Riley) #3

It should look for the wrapper script and use that if it exists (gradlew)