This have been mentioned on the mailing list before. Steps to reproduce:
1) Perform a clean checkout of trunk
2) Issue "gradle idea"
3) The build fails with some error about "could not invoke minus on null"
A work around is to do "gradle build" before attempting to generate the idea project.