I’m looking to write a plugin for a licensed product. As such I cant do dependency management in the standard way.
What would be the best way to pass libs to a plugin from a build script that wants to use the plugin?
For info I am looking to write a plugin for the Oracle Weblogic ant tasks.
I wrote a blog post on doing this through using tasks: This link
erdi
(Marcin Erdmann)
August 11, 2014, 8:13am
2
Why don’t you simply use the same technique as in the example on your blog? Ask your plugin users to provide that dependency in a custom configuration that your plugin would create. It doesn’t even have to be in a buildscript {} block because your plugin won’t need it on the classpath as it’s just using an ant task from that dependency.
Thanks for the reply. Are you familiar with any simple plugins that exercise this that I could use as an example?
erdi
(Marcin Erdmann)
August 11, 2014, 1:13pm
4
It’s probably not a simple plugin, but gradle plugin for ratpack creates a springloaded configuration and it expects build user to add dependencies to that configuration: https://github.com/ratpack/ratpack/blob/master/ratpack-gradle/src/main/groovy/ratpack/gradle/RatpackPlugin.groovy#L45
Thank you very much. I was clearly over-complicating this in my head.
erdi
(Marcin Erdmann)
August 11, 2014, 2:19pm
6
No problem. Yes, it’s very similar to what you already have in your blog post.