Using the Java Model for new Plugins

I really like where y’all are going with the new model based approach. The challenge I’m having is trying to understand how I’d use it when writing plugins around the Java model customized for my enterprise. Specifically, I’d like to extend the Java model by adding our “standard” configuration, creating JavaDoc & source ZIP for each SourceSet, publishing Ivy to a binary repository, etc. I’ve done this in the legacy model. I just struggle trying to understand how to do this in the new model.

For example, let’s say I want to create a new configuration. How do I inject the ConfigurationContainer into a rule as a ModelMap?

For another example, how would I inject the SourceSetContainer as a ModelMap into a rule along with a ModelMap so I can create the JavaDoc and source ZIP?

You’ve provided several good examples for the Person interface. A few practical examples in the Java space would be very helpful.

Thanks!

2 Likes