Skip to content

Instantly share code, notes, and snippets.

@marc0der
Created November 17, 2012 11:13
Show Gist options
  • Save marc0der/4095013 to your computer and use it in GitHub Desktop.
Save marc0der/4095013 to your computer and use it in GitHub Desktop.
Add environments to Gradle build
def loadConfiguration() {
def environment = hasProperty('env') ? env : 'dev'
ext.environment = environment
println "Environment is set to: $environment"
def configFile = file('config.groovy')
def config = new ConfigSlurper(environment).parse(configFile.toURL())
ext.config = config
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment