Println statements printed every time any task runs

I just upgraded from version 3.1 to 3.2.1 and I noticed that all the println statements that I have in gradle files are now printed when I call any task. They seem to be evaluated even though the tasks themselves (where the println statements actually are) are not executed.

I have some info that would like to print as a result of the task I’m executing.

If I use logger.info I get a lot more than what I what to see in the console.

Found the answer here:

It’s how you declare the task. Gradle tasks could be declared using << but that is marked as deprecated, so now you have to use doLast.