I have started migrating my plugins to use the new model mechanism. I cannot find any documentation or examples of how to create a new configuration or add a dependency for that configuration. I have tried @Path and ModelMap but get a binding exception. I am using Gradle 2.5.
configurationHandler and dependenciesHandler have not yet been ported to the new model.
The âmodelâ task gives you the list of the things in the model space.
Beyond those things, you can add new elements with the @Model annotation, but you canât use existing containers if they have not been ported yet.
You will have to live with the old and the new model for now. Sometimes this is not possible
Thanks Francois for the quick reply!
Right now there arenât specific plans to port (âbridgeâ is often the term we use internally) these to model land. More likely is that weâll provide a bridging mechanism to allow you to get at the Project
and therefore everything else that is attached to it.
More specifically, dependencies will be handled differently with the software model (which is built on the new configuration model). Some support for this already exists in master and will be available in Gradle 2.7. The big missing bit is external dependency support which is in the works as we speak.
Iâve run into a similar problem, and I wonder if the external dependency support made it into 2.9? If so, is it documented anywhere?
External dependency management in the Java software model is coming in Gradle 2.10.