To set some properties, we can do it as
project.ext {Some examples of using these properties are given below.
myVar = "A variable"
isProcessStarted = null
}
/** Task which starts some process */
task startProcess() << {
project.isProcessStarted = true
}
/** Task which stops a process */
task stopProcess() << {
project.isProcessStarted = false
}
/* Stop the process only if the process was started */
stopProcess.onlyIf { project.isProcessStarted == true }