gradle: Just replace clean task actions rather than whole task

Signed-off-by: BJ Hargrave <bj@bjhargrave.com>
Merge pull request #566 from bjhargrave/gradle-clean

gradle: Just replace clean task actions rather than whole task
gradle template: declare that we're in the offline build

This was missing between the Ant and Gradle builds

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>