You are hitting GRADLE-2407, which was discussed in the post I linked to.
Because of this bug, you can’t implicitly apply the plugin (due to sequencing issues). This post outlines the approach you can take to reduce the application to one method call.