How to use Checkstyle plugin

I am using gradle 2.14.1 and trying to use the checkstyle plugin.

I have added the block
apply plugin: ‘checkstyle’

But checkstyle is not installed when I run gradlew tasks.
Has anyone come across this? Please provide direction.
Thanks.

I think they do not have a “group” assigned to them, so they do not show up by default. Try gradle tasks --all and they should show up under “Other Tasks”.