Have you tried (in build.gradle):
test {
systemProperties = System.properties
}The system properties are null for tests by default. You can override that with something like above. From: Kallin Nagelberg [mailto:[email protected]] Sent: Tuesday, September 27, 2011 12:20 PM To: [email protected] Subject: [gradle-user] unable to pass system property to test Hey, I've tried all manner of wizardry to pass a system property to my tests, but no dice. I've tried things like test.allJvmArgs = (test.allJvmArgs << ['-XX:MaxPermSize=512M','-Ddb.username=bakala']).flatten() and test { systemProperties['db.username'] = 'bakala' jvmArgs '-Ddb.username=bakala' } and gradle -i myTest -Ddb.username=bakala In my test I have System.out.println(System.getProperty("db.username")); and it always comes out as null. Any help would be really appreciated! Thanks, -Kallin Nagelberg
