is there a task, or lifecycle event that I could h...
# community-support
c
is there a task, or lifecycle event that I could have depend on my task such that my task would essentially always run if its inputs had changed?
:classes
is the closest I can think of that is basically run no-matter what I do, but even that's not really true is it. Ideally intellij would trigger it too if it had its projects refreshed
a
This is quite hacky, but in the
settings.gradle
or root
build.gradle
, you can take the `startParameter`/`gradle.startParameter` object and change the set of tasks that were requested to include your task. This is effectively like making it so users always add the task name to their commands, which sounds like the behavior you're looking for. (I'm not sure if IntelliJ's import would also run that, but it feels plausible.) This trick has a known bug if you're using the configuration-on-demand feature, but most projects don't.
c
well now I want to use configuration-on-demand, lol
v
You could also make all tasks depend on your task, so that your task is always run if any task is run.