Bosh
Bosh

Reputation: 8748

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?

Upvotes: 7

Views: 1629

Answers (1)

Peter Niederwieser
Peter Niederwieser

Reputation: 123920

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).

Upvotes: 12

Related Questions