The ear task in Gradle 1.8 generates an ejb module for each subdirectory of the configured ‘appDirName’. This leads to a broken application because those directories normally do not represent a valid ejb module (See the screenshots for an example).
I also tried to use the default project layout with src/main/application. Same result.
The exactly the same buildscript is working correctly with Gradle versions 1.5 and 1.6.