How to fail on property not defined properly in this case?

I previously posted the following question

http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property

as it results in the following description on this page

https://mvnrepository.com/artifact/org.webpieces/plugin-api

which says “Someone forgot to fill this in. See http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property

Ideally, I would prefer to break this build but the scenarios I tried in the SO post seem not to work.

thanks,
Dean