I had a hard time figuring out how to publish a source Jar with a custom plugin when using Java Gradle Plugin Plugin. Turns out the "New Model" for configuration is going to be deprecated soon (see Gradle Summit 2017 keynote) but is still used in some of the incubating plugins such as maven-publish and ivy-publish. Just got this working in Kotlin-DSL so I hope it helps someone else writing plugins behind a firewall.