I’ve written a plugin over at https://github.com/huxi/huxi-gradle-plugins/tree/master/git-state-plugin
That plugin attaches a ‘checkGitState’ task to the project it is applied to. This task makes sure that the git repository is in a clean state, i.e. it makes the build fail if there are new or modified files. There is an additional extension property to enable that check.
Would it be a desired best-practice to let an existing task, like ‘check’, automatically depend on that task? I currently leave this to the user of the plugin but that feels kind of un-gradle.
Gradle build time: Tuesday, March 13, 2012 4:10:09 PM UTC
Ant: Apache Ant™ version 1.8.2 compiled on December 20 2010
JVM: 1.6.0_29 (Apple Inc. 20.4-b02-402)
OS: Mac OS X 10.7.3 x86_64