Mikołaj Mański
Mikołaj Mański

Reputation: 150

Providing system properties via command line with dot in the name in Gradle

We are migrating our project from Maven to Gradle. Our CI uses system properties like -Dwebdriver.type=firefox to set certain behaviour thus we don't want to hardcode such props in gradle.properties file etc. Is there a way to provide a system property with a dot in the name using command line?

Upvotes: 1

Views: 878

Answers (1)

Opal
Opal

Reputation: 84786

If you run the following:

build.gradle:

logger.lifecycle("some.property ${System.properties['some.property']}")

with:

gradle -Dsome.property=lol

It should give you the expected output.

Upvotes: 1

Related Questions