Gradle embraces domain modelling as a core tenet. Focusing on the domain model as opposed to the execution model (like prior generation build tools such as Apache Ant) has many advantages. A strong domain model communicates the intent (i.e. the what) over the mechanics (i.e. the how). This allows humans to understand builds at a level that is meaningful to them.
task hello
hello.doLast {
println "I am a task"
}
task hello {
doLast {
println "I am a task"
}
}
task bye {
doLast {
println "I am another task"
}
}
bye.dependsOn(hello)
plugins {
id 'java'
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.6.21"
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework:spring-core:4.0.6.RELEASE'
testCompile 'junit:junit:4.12'
}
gradle help
gradle wrapper
./gradlew myTask