Posts

Showing posts from April, 2015

Enforcement Rules in Gradle

I previously noted that Gradle has no built in enforcement rules, there is a blog here detailing how you can add your own, but that's not satisfactory for a number of reasons which I won't go in to. What is one to do? Well this one took that as a challenge so the gauntlet has been thrown down and accepted! Sweeney Well the first rule of any development is to come up with a suitably obscure and memorable name. So my thinking went: enforces rules -> like the police -> what do we call the police? Well a number of things but in the UK 'The Sweeney' was a memorable Police drama (at least for me) hence sweeney! Sweeney Gradle Plugin The sweeney gradle plugin supports a few basic rules out of the box with a couple of specifics for the Java and Gradle versions, it also supports enforcing rules and emitting warnings from rules.  Built in Rules Out of the box it has an equality, pattern and version range rules that can be configured, using syntax very similar