Javadoc exclusion question

So is there any reason why gradle fails at this task, compared to doing it in the command line? We were hoping to keep as much as possible in our gradle script, but if it can’t exclude packages/classes properly without screwing up the whole build, then we’ll have to just generate the docs outside of gradle.