Best approach to apply custom plugin to root project via init script in a custom distribution

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.