Skip to content

Instantly share code, notes, and snippets.

@kob-aha
Last active January 2, 2016 00:49
Show Gist options
  • Save kob-aha/8226043 to your computer and use it in GitHub Desktop.
Save kob-aha/8226043 to your computer and use it in GitHub Desktop.
Example of how to configure multiple keys in a property file with the same value
def configStr = '''
installer.dir="${installerDir()}"
dist.dir="${installerDir()}/Incubator"
def installerDir() {
'/home/test'
}
'''
def config = new ConfigSlurper().parse(configStr)
assert '/home/test' == config.installer.dir
assert '/home/test/Incubator' == config.dist.dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment