User Guide Example 6.12 errors out

Hello I am having an issue with the users guild example 6.12

task myTask {

ext.myProperty = “myValue” }

task printTaskProperties << {

println myTask.myProperty }

It error when running the gradle -q printTaskProperties

with

  • What went wrong: A problem occurred evaluating root project ‘Ex6.12’. > Could not find property ‘ext’ on task ‘:myTask’.

Not sure why but I am running Gradle build from Feb 13, 2012 which I believe is the lasted one. Any suggestion what the issue might be?

Thanks Don

There have been many Gradle releases since February 2012. In order for the sample to work, you’ll have to use a more recent version.

PS: All samples in the user guide undergo some automated testing.