I know that src/main/java, src/main/resources or src/main/groovy are standard in Maven-land. But now that I’m migrating to Gradle I started wondering why this was adopted as the default here, too? I totally appreciate the need for separating main and test (and integTest etc…). But why different folders for different languages? I have never heard a convincing argument for that.
Arguments against it:
- I have to repeat my packages for every language. So if I have Java, Xtend, Groovy and Resources in the same project, I have to create the same packages in four different folders. - When I see a class name, I first have to think “Hmmm, what language is this probably written in?” before I can open the correct folder. Of course this is a non-issue in IDEs, but browsing such a repository on GitHub is nigh impossible. - It scares off colleagues who are used to a flat layout. It may even convince them that build automation will only make their life more complicated and reject it because of that.
Of course Maven zombies (I used to be one too would just tell me “because its convention”. But since the Gradle folks adopted it too, there must be some good, pragmatic reason. What is it? =)