Modify Gradle plugin so it should be able to be published into Maven Central.

Still needs a bit of work to integrate into gradle build/release/publish process.