To put the question in other way, does Gradle impose certain directory structure into the project it manages?
I have a legacy project in my plate, and the task is to make it easier for it to build and manage. It is a multi-module Java EE application. I found (and you will too i'm sure) that the current build process is utterly skewed and totally a time waster.
I believe this is the time to straighten things by introducing build management system, and the choice is between Maven and Gradle.
Most of the projects are using eclipse project's directory structure. Several others using different directory layout which until now I cannot find the reason behind. Using Maven, this will be a stumbling block as we will need to restructure the directories to comply with maven's convention. Restructuring directories might be huge additional effort as we need to sort it out on the CVS also.
Thus the question to Gradle.
Both can accommodate arbitrary directory structures. IMO it's easier in Gradle, and not worth it in Maven.
That said, I kind of like having an imposed directory structure, and for the most part, I like the Maven structure. It is a pain in CVS because of the directory-handling issues, but in the long run, moving to a consistent structure across projects is worth it.
Gradle uses convention over configuration which allows you to provide minimal information to build your project if you follow the standard project layout. That said everything is still configurable using a declarative style:
sourceSets {
main {
java {
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
Because you have a real programming language you can do almost anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With