Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I pass along all properties when for a GradleBuild task?

I'm executing a GradleBuild task, and I'd like to maintain all the properties that the current script has been given. In other words, I want to package up "these startparameters" and pass them along to the build I'm calling.

Is there any way to do this cleanly?

like image 359
Bosh Avatar asked Sep 26 '13 05:09

Bosh


1 Answers

If you mean project properties:

task foo(type: GradleBuild) {
    startParameter.projectProperties = gradle.startParameter.projectProperties
}

If you mean system properties, replace projectProperties with systemPropertiesArgs (on both sides).

like image 63
Peter Niederwieser Avatar answered Nov 09 '22 22:11

Peter Niederwieser