How can I find a task definition? I’m new to Gradle and tasked, pardon the pun, with figuring out why a task fails. I’m stuck because I can’t see where the task is mentioned in the build.gradle file. The task is “release” and I suspect it’s buried within one of the plugins. If that’s the case, is there an easy way to find out which plugin I can look in? If that’s not the case, what is the case?
You can try
gradle tasks - it lists all tasks that assigned on the particular groups - for example “IDE tasks”
then try to run your task with with different logging level like info, debug. Read stack trace.
gradle -i release
gradle -d release
gradle release --stacktrace
Something like that
If a task has an assigned
description property then it will show up in the tasks report. That should give you an indication of the purpose of the task. Unfortunately, the tasks report does not indicate where the task was defined. That’s definitely something I’d love to see in the future.
release task might be coming from the release plugin. Please check the portion of your build script that applies plugins.