TrigonicSolutions/gradle-rpm-plugin — pull request #21 by seanjreilly (2012-11-12 12:27:45+00:00)
Title: InetAddress.localHost can throw an exception

We've just started using this gradle plugin, and it's working great, but we've discovered one issue.

In some cases, the call to `InetAddress.localHost` (on line 41 of Rpm.gradle) can throw an UnknownHostException. When this happens the plugin crashes.

This pull request is a potential fix that catches the exception and uses a sensible default (the string 'unknown'). A unit test is also included.

(The pull request also includes the work I needed to do to get the gradle script to work with IntelliJ, and some *very* minor code cleanup. Neither of those commits is relevant to the bug per se.)