It might be helpful for people unfamiliar with Maven and Gradle to explain how 
the system works.

While Gradle supports full scripting, much like ant (scripts written in Java, 
Groovy, or Kotlin), the main paradigm is "state description". That is, you 
describe the desired state transition, say, from Java code to .class file, or 
from .class files to .jar, as a task, and then Gradle analyzes what's available 
already and selects tasks to make those transitions happen in accordance with 
the dependency tree--much more like "make" than "ant".

The Java, .Jar, war, and other plugins define tasks which already know about 
certain dependencies, e.g. "*.java" to "*.class", so when Vladimir says "it 
knows", what he means is "someone already defined that set of tasks, and they 
execute automatically during the right build phase".

On 2/27/19, 11:34 AM, "Vladimir Sitnikov" <sitnikov.vladi...@gmail.com> wrote:
...
    sebb> How does Gradle know what the required commands are?
    sebb> Don't you have to tell it?
    
    No, I don't. It just analyzes build script and it knows which modules it
    needs to recompile and which are fine.
...


Reply via email to