Reputation: 3494
I am migrating few gradle scripts built using 1.x in to 3.3. I found the way adding dynamic properties changed in Gradle 2.x/3.x
Used to add simply by defining the property at the top level.
foo = "dev"
How do I add dynamic property to root project in Gradle 2.x/3.x
Upvotes: 1
Views: 487
Reputation: 3494
I think I found the answer. We now have a cleaner separation
project.ext.env= "dev"
task doStuff {
println ext.${env}
}
Upvotes: 1