External-Config

This plugin will mimic the Grails 2 way of handling external configurations defined in grails.config.locations.

VERSIONS!

The grails-3.x branch is for Grails 3.x, master will, moving forward be for Grails 4.x

IMPORTANT!

The External Config Plugin (1.1.0 and above) no longer needs to implement ExternalConfig on Application.groovy. It now uses a SpringApplicationRunListenerand hooks into the startup automagically. So if you used the plugin in prior versions, please remove implements ExternalConfig from Application.groovy

Note: the wildcards are in the order they are found in the locations list, but the order of the expanded locations for each wildcard is not guaranteed, and is dependent on the OS used.

Getting configuration from another folder than /conf on classpath without moving it with Gradle script

If you wish to make your Grails application pull external configuration from classpath when running locally, but you do not wish to get it packed into the assembled war file (i.e. place the external configuration file in e.g. /external-config instead of /conf), then you can include the external configuration file to the classpath by adding the following line to build.gradle:dependencies

providedCompile files('external-config') // providedCompile to ensure that external config is not included in the war file

Alternatively, you can make a gradle script to move the external configuration file to your classpath (e.g. /build/classes)

Scripts

This plugin also includes two scripts, one for converting yml config, to groovy config,
and one for converting groovy config to yml config. These scripts are not guaranteed to be
perfect, but you should report any edge cases for the yml to groovy config here:
https://github.com/virtualdogbert/GroovyConfigWriter/issues