Last active
January 2, 2016 00:49
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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