"help --task taskName" broken?


(Björn Kautler) #1

Somehow I doubt this is working like intended. I called “tasks” task on gradle 1.11 source to find the task to build a distribution package. Here the outcome: https://gist.github.com/Vampire/3a23ae85cd2ccf7d2840#file-gradlew-tasks

Besides the deprecated warnings during execution, I thought that packageBuild might maybe do what i want and I wanted to get more information about the task, so I wanted to use the “help --task” command introduced with 1.10, so I called “help --task pB” But the output was not like expected. First it gave the help for “verifyIsProductionBuildEnvironment” instead of “packageBuild”, then something was executed, I’m not sure what. Here the output: https://gist.github.com/Vampire/3a23ae85cd2ccf7d2840#file-gradlew-help-task-pb

PS: I first included the outputs in <code> tags inline here, but at least the second section was scrambled in the end, so I created a Gist. Maybe you want to investigate on this too.


(Peter Niederwieser) #2

‘packageBuild’ isn’t a regular task, and ‘–help’ may not work correctly for it. Do you have a similar problem with any other build?


(Björn Kautler) #3

It was the first and only time I used that command to date. Even if it works fine with other builds or “regular” tasks, I guess it should at least not do what it did, giving out the help for another task and executing yet other tasks. In the meantime I have seen that packageBuild is a “build type” which replaces itself by the list of configured tasks which explains the behaviour I have seen, as it showed the help for the first task and then executed the remaining builds, so it seems the help task works correctly, but is just tricked by the hacky build types. Actually I was just in a patching mood, so I fixed the problem for you. :slight_smile: PR is at https://github.com/gradle/gradle/pull/272