Catch UnsupportedOperationException and handle it properly.
Merge pull request #54 from nebula-plugins/issue-48

Catch UnsupportedOperationException and handle it properly.
Merge branch 'gradle-1.12' into gradle-2.0.