I am new to Plugin development and Gradle.How do I include depends on option in Custom Plugin. @TaskAction
def localBuild(){
println" Local build started…"
dependsOn{
“clean”
“classes”
}
doLast{
copy {
println “configurations.runtime”+configurations.runtime
from configurations.runtime
into project.projectDir.toString() + "/src/main/webapp/WEB-INF/lib"
println"into"+project.projectDir.toString()
}
}
}
@TaskAction defines the primary action to be invoked by the task. You cannot put any configuration items in there.
doLast is a way of adding more actions, put usually that code itself should be inside the primary task action. Idiomatically doLast and doFirst are reserved for build script authors to customise the behaviour of an existing task.