Answers for "gradle dolast"

0

gradle dolast

#With doLast():
task("testTask") {
    doLast {
		println "hello testTask"
    }
}

#Without:
task("testTask") {
	println "hello testTask"
}

#The doLast creates a task action that runs when the task executes. 
#Without it, you’re running the code at configuration time on every build. 
#Both of these print the line, but the first one only prints the line when the testTask is supposed to be executed. 
#The second one runs it when the build is configured, even if the task should not run.
Posted by: Guest on March-25-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language