java123999
java123999

Reputation: 7404

Gradle: No such property for class?

I am trying to compile an existing codebase using the newest version of gradle. The build fails due to the following line in the modules build.gradle file:

project.setProperty("doNow", true)

with this error:

 No such property: doNow for class: org.gradle.api.internal.project.DefaultProject_Decorated

Do I need to declare this property within build.gradle before the line causing an error?

From gradle docs for setProperty:

Sets a property of this project. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.

Upvotes: 5

Views: 11255

Answers (1)

Opal
Opal

Reputation: 84864

Try: project.ext.doNow = 'lol'

Upvotes: 4

Related Questions