Consider below code
task circle { doLast { float r = Float.parseFloat(project.properties["radius"]) println (22/7)*(r ** 2) } } task square