Passing dependency to plugin from project

(Sion Williams) #1

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

(Marcin Erdmann) #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.

(Sion Williams) #3

Thanks for the reply. Are you familiar with any simple plugins that exercise this that I could use as an example?

(Marcin Erdmann) #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:

(Sion Williams) #5

Thank you very much. I was clearly over-complicating this in my head.

(Marcin Erdmann) #6

No problem. Yes, it’s very similar to what you already have in your blog post.