Hi, for my plugin I need to check whether the daemon is running or not. Currently I use this approach:
DAEMON_PROP = 'org.gradle.daemon'
(project.hasProperty(DAEMON_PROP) && project.property(DAEMON_PROP) == 'true')
But this condition remains true when gradle.properties sets org.gradle.daemon to true and the user uses --no-daemon. Is there a more reliable way that takes into account the --no-daemon option?
EDIT: The startParameter class does not seem to capture the --no-daemon option:
https://docs.gradle.org/current/javadoc/org/gradle/StartParameter.html
EDIT: Rephrasing the same question: How can I check whether the user has activated the daemon using --daemon?