0

makefiles instruct the build tool Make on how to compile and link a bunch of source code files. If I understand correctly, Gradle and Maven (as well as some other like Ant, Rake, Phing, and CMake) are also build tools that serve the same purpose as Make. If so, I'm assuming that they all need to have some sort of "instruction file", just as Make has makefiles as it's "instruction files".

From my reading I understand that XML files serve as "instruction files" for Maven and Groovy DSL files do so for Gradle.

I don't think that's entirely correct though, especially because Groovy is a language for web development so I don't see how it's relevant here.

  • 1
    A Makefile describes the exact steps to create a result of it. Compile source files which are dependent of h files and c file. If one of these files changes the things will be done. Ant XML File works the same. In Maven there is a declarative description. So you don't say compile this compile that and bind that to a jar file. In Maven you declare packaging type and dependencies. Based on life cycle etc. Maven knows how to build the result. In Gradle you can do the same setup like a Makefile apart from that you use Groovy which is a JVM based language (Gradle has changed to Kotlin)... – khmarbaise May 09 '19 at 05:30
  • @khmarbaise Actually, Gradle is more like Maven, very declarative and not as explicit as Make files. The difference is between a static markup language (XML) on the one hand and the dynamic general purpose language (Groovy) on the other. – Lukas Körfer May 09 '19 at 10:08
  • Gradle can be scripted in any way you like based on the dynamic language.. which can't be read programmatically etc. You can declare your build declarative if you like but most of the Gradle based builds I've seen are just a scripting hack...sorry to say that...and yes in the meantime Gradle has learned the advantages of a more strict way... – khmarbaise May 09 '19 at 17:23

0 Answers0