gradle-info-plugin
gradle-info-plugin copied to clipboard
info-ci: Ability to plug in custom CI info providers
It would be good to be able to plug in other ContinuousIntegrationInfoProvider implementations in order to use this plugin on other CI servers such as Travis, Bamboo or Drone.io.
The implementation uses the ServiceLoader to discover the ContinuousIntegrationInfoProvider implementations. This allows others to provide implementations for other CI servers that are not provided within the gradle-info-plugin itself.
Thanks for the pull request. We are going to have a look at it soon.
Cool addition. My biggest worry is what Gradle can and will do to the classpath available between plugins. E.g. in the future I'm not sure we're guaranteed to have access to other jar/plugins in the buildscript classpath.
I'd rather see this plugin know about all sorts of systems in a "cheap" way, then dynamically load up configurations with the appropriate jars to execute. From a user's point of view, they shouldn't need to know what other providers to add. But then again, I can see the Enterprise side of things, where they might want to configure their own providers internally behind the scenes.
I agree with you. I have used the Java Service Loader in some of my other plugins and whilst it works fine when using it in the older syntax by including it on the build script classpath and then applying the plugin, it doesn't work using the newer style plugins syntax, so from this perspective I couldn't recommend applying this pull request in the state that it is in.
I have however taken the an alternative approach to extending the CI providers in one of my own plugins here:https://github.com/boxheed/gradle-extended-info-plugin which has implementations for a number of the CI providers.
Accidental slip with the mouse.
Do you have any ideas on how to approach making CI providers pluggable, other than I have done in my own extension to your plugin?