I’m writing a plugin, and I would need to be able to add properties to the project based on some runtime conditions, which means that I don’t know the properties when I compile the plugin. I tried to create a convention plugin with the usual Groovy getProperty / setProperty methods, but such properties are not ‘seen’ by the Project (it seems the properties have to be ‘real’ static ones). What are my options? I found: project.getConvention().getExtraProperties().set(…) and project.getExtensions().getExtraProperties().set(…) with getExtensions() actually being getConventions() with a cast. There might be other places better suited for what I’m trying to do. What should I be using for my use case? What is the most stable and reliable place to put my properties?
wujek