I’d like to use a custom syntax within closure argument to “configurations” in my dependency configuration file
configurations {
configA
configB { userProperty 'user value' }
}
When executing gradle, I get error message “Could not find method userProperty() for arguments [user value] on configuration ‘:configB’.”
My plan is to implement a custom class Configuration, resp. replace or extend class DefaultConfiguration.
By browsing the source of gradle it seems to me, that I have to implement ConfigurationContainer, resp. replace or extend DefaultConfigurationContainer.
I wonder, whether this is the best way and whether it is wise to extend internal gradle classes.
- Is there an easier or recommended solution? - Could plugins help here? - Are there properties or methods of Project, that are better suited to achieve my task?
I’m currently bound to gradle 1.4, but the problem seems to be identical up to gradle 1.7.
Greetings, Chris.