Search code examples
grailsgrails-plugin

Naming conventions for Config.groovy properties


I am writing a plugin. I am adding some properties to the config.properties. Is there a naming convention that I should be following?


Solution

  • While there isn't a set standard, it's best to look at some of the high quality plugins that are available for guidance. Typically you will see them use the following:

    grails.plugin.nameofthepluginlowercase.configValue
    

    The rational behind using the grails.plugin.nameoftheplugininlowercase is to ensure there are no collisions between plugins with similar configuration keys. (See here for said explanation)