How I can configure the Jar task in Gradle to create the jar file with the directory entries?
Like the “filesonly=false” option of Ant’s jar task, or the Eclipse option “Add directory entries” in the Export Jar dialog.
To be honest, I cannot see where is the difference between a Jar with directory entries and one without them, but I have a Spring project which uses some @Component configured bean from an external Jar: if that Jar has the directory entries, Spring is able to find the beans, otherwise not (as stated in the Spring documentation itself).
UPDATE: I figured out that in the last releases (I’m currently using 1.0-m6) Gradle already was creating the Jar the right way, that is: with all the proper directory entries. My problem was due to a bug in a task of my own that was building the classes dir with incomplete content.
I still haven’t found a way to have Gradle add the directory entries, but as I already stated in the question, the last releases of Gradle do it properly. So if anyone has same problem like me, a solution is to upgrade Gradle ;o)