Skip to content

Instantly share code, notes, and snippets.

@mosheeshel
Created January 23, 2017 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosheeshel/7554922a234deffc3fa0d6f6d9a72aae to your computer and use it in GitHub Desktop.
Save mosheeshel/7554922a234deffc3fa0d6f6d9a72aae to your computer and use it in GitHub Desktop.
test task that prints out environment variables and those set for JVM executors that gradle will run and shows how to set specific systemProperty from external value...
apply plugin: 'java' //needs this to have test task defined
test {
println "Host system properties"
System.properties.each { k,v->
println "$k = $v"
}
systemProperty 'db.test.mode', System.getProperty("db.test.mode", "EMBEDDED")
println "Gradle system properties"
systemProperties.each { k,v->
println "$k = $v"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment