Show Navigation

grails-advanced-config

Grails Advanced Config Plugin

Owner: reid | 1.0 | Feb 23, 2018 | Package | Issues | Source | License: Apache-2.0


dependencies {
    compile 'net.realizeideas:grails-advanced-config:1.0'
}

            

Grail Advanced Config Plugin

A small Gradle plugin built to help with Grails config files.

It takes config files from different locations and composes it into application.yml

Config structure

Setup

Basic setup in build.gradle:

buildscript {
    repositories {
        maven { url "https://dl.bintray.com/reid/plugins" }
    }
    dependencies {
        classpath 'net.realizeideas:grails-advanced-config:1.0'
    }
}
apply plugin: "net.realizeideas.grails-advanced-config"

By default plugin takes all input config files from:

  • grails-app/conf/configurations/common
  • grails-app/conf/configurations/"${grails.env}"

You can override this behavior and set required config files manually:

advancedConfig {
   configFiles = files(
        'grails-app/conf/config1.yml',
        'grails-app/conf/config2.yml',
   ) as List
}

Supported file format

For input files:

  • yml
  • groovy
  • json
  • xml

Output file - application.yml